Hello once again,
i tried manipulate the build in mini-calendar of the scheduler. Of course i know, that the functions are only rudimental, so i realy want to block or even hide weekends from it, but i know that this is actually only possible in the real dhtmlxCalendar
What is documented that it should work, is the function markCalendar(), isn’t it?
First i had a big problem to understand, how to call the resource of the calendar, once initalised by the routine, brought to us by the example-page. I figured it out like this (is it right?):
var minikalender;
function show_minical(){
if (scheduler.isCalendarVisible()) {
scheduler.destroyCalendar();
} else {
minikalender = scheduler.renderCalendar({
position:"dhx_minical_icon",
date:scheduler._date,
navigation:true,
handler:function(date,calendar){
scheduler.setCurrentView(date);
}
});
}
}
Now i want to mark a date (or even a whole bunch of dates, but for this one date will be okay), by adding this line:
scheduler.markCalendar(minikalender, new Date(2015, 4, 6), "kalender_urlaube");
after });…
When i am in the correct month of the marked-day, this day (06. of May) is colored in the correct CSS-class (kalender_uralube). When i change the month with the mini-calender and change back to may, there is nothing more marked… Same if i switch FROM another month to May (for example when i open up the mini-calendar from antoher month).
What’s wrong here? Tha calendar is always newly rendered when i change months? So i have to mark the events each time again - But where (btw: Could make it little bit slow when i have a big list of events to mark )…
FYI: Just want to colour holidays in the mini-calendar.