DHTMLX Docs & Samples Explorer

onChange

Fires when a user changes month, year or time in selector.

myCalendar.attachEvent("onChange",function(date, state){
      alert("Date is changed to "+date) 
})

Parameters of handler function:

  • date - (date) the selected date.
  • state - (boolean) in case calendar initialized as date input field, the parameter returns 'true' if date is changed manually (through input field) or 'false' if date is changed through selectors.