Hello,
I’ve some issues with navigation bar, I do not know how to change events of default buttons.
Some examples:
Button next day moves to next day, but when is friday I want button skip to next monday. How to change this beaviour?
And also, if i want keyboard events “Right Left and Page Next” skip to next day, hoy to handler this event to button. I’ve asked it also in this post (viewtopic.php?f=25&t=32724)
I want create a custom button to skip a desired date, this sample
scheduler.setCurrentView(new Date(), ‘workweek’);
It’s good, but, if i want to skip to current a day of the current view, how do I get the current view?
Try giving it zero height and hiding it with css.
js:
scheduler.xy.nav_height = 0;
css:.dhx_cal_navline{
display: none;
}
As for customization of navigation bar buttons and skipping days, you may do it with onBeforeViewChange
Try the code like following:scheduler.attachEvent("onBeforeViewChange", function(oldMode, oldDate, mode, date){
if(mode == "day" && (date.getDay() == 0 || date.getDay() == 6)){
scheduler.setCurrentView(scheduler.date.add(date, 1, "day"), mode);
return false;
}
return true;
});