showing the date only in month and year view....

Hi,

because i have to programm for 1024 x 768 resolution, i have to show the date only in month and year view …

the html of my scheduler looks like this:

<div id="date_on_scheduler" class="dhx_cal_date" style="visibility: hidden;"></div> <div class="dhx_cal_tab" id="zeitfenster_tab" name="zeitfenster_tab" style="position:absolute; top:2px; left:24.0em; visibility: visible;">Zeitfenster</div> <div class="dhx_cal_tab" id="sperrzeit_tab" name="sperrzeit_tab" style="position:absolute; top:2px; left:31.4em; visibility: visible;">Sperrzeit</div>

in the init() function i have:

[code]scheduler.attachEvent(“onClick”, function(){ if(scheduler._mode != “day” || scheduler._mode != “week”){ document.getElementById(“date_on_scheduler”).style.visibility = “hidden ! important”; }});

scheduler.attachEvent(“onClick”, function(){ if(scheduler._mode != “month” || scheduler._mode != “year”){ document.getElementById(“date_on_scheduler”).style.visibility = “visible ! important”; }});

scheduler.attachEvent(“onClick”, function(){ if(scheduler._mode != “day” || scheduler._mode != “week”){ document.getElementById(“zeitfenster_tab”).style.visibility = “visible ! important”; }});

scheduler.attachEvent(“onClick”, function(){ if(scheduler._mode != “month” || scheduler._mode != “year”){ document.getElementById(“sperrzeit_tab”).style.visibility = “hidden ! important”; }});[/code]

but whatever i do, nothing changes, the “date_on_scheduler” is always there… and no zeitfenster_tab in day or week view…

what is the magic behind it?
p.s. i have the visibility in the css of date_on_schedule hidden too!

onClick event occurs when you clicking on some event in scheduler, I think you must use onViewChange instead.

scheduler.attachEvent("onViewChange", function(){ var show = scheduler._mode == "month" || scheduler._mode == "year"; document.getElementById("date_on_scheduler").style.visibility = show?"visible":"hidden"; });

the problem is, that, if i use

<div id="date_on_scheduler" class="dhx_cal_date" style="visibility: hidden;"></div>

its always visible… even if i click on the other buttons to make it hidden…

looks like its solved… thanks…
i had an old function which was disturbing (and i couldnt remember i wrote it) :unamused: