onBeforeViewChange
fires before the user changes the current view to some other one
boolean onBeforeViewChange(string old_mode,object old_date,string mode,object date);
old_mode | string | the currently active view |
old_date | object | the currently active date |
mode | string | the new view |
date | object | the new date |
boolean | defines whether the default action of the event will be triggered (true) or canceled (false) |
Example
scheduler.attachEvent("onBeforeViewChange", function(old_mode,old_date,mode,date){
//any custom logic here
return true;
});
Related samples
Details
- The event is blockable. Return false and the scheduler will leave the current view opened.
- The event also fires when the scheduler is initially being rendered on the page. In this case, the old_mode and old_date parameters are underfined.
Back to top