DHTMLX Docs & Samples Explorer

onBeforeChange

Fires before a user starts to change month, year or time in selector.

myCalendar.attachEvent("onBeforeChange",function(date){
      alert("Date will be set to "+date) 
})

Parameters of handler function:

  • date - the selected date.

Description:

  • If the handler function returns 'false', a user won't be allowed to change date in calendar, i.e. the current date will be selected all the time.