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_modestringthe currently active view
old_dateobjectthe currently active date
modestringthe new view
dateobjectthe new date
booleandefines whether the default action of the event will be triggered (true) or canceled (false)


scheduler.attachEvent("onBeforeViewChange", function(old_mode,old_date,mode,date){
    //any custom logic here
    return true;

Related samples

  • 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