DHTMLX Docs & Samples Explorer

Event Handling

attaching/detaching events

You can attach several handlers to the same event and detach them using two respective methods:

  1. attachEvent() - to attach event

    var myEvent = myCalendar.attachEvent("onClick", function (){
        //event handler code
    })
  2. detachEvent() - to detach event

    myCalendar.detachEvent(myEvent);

list of events

  • onBeforeChange - fires before a user starts to change month, year or time in selector.
  • onClick - fires after a user selects date.
  • onChange - fires when a user changes month, year or time in selector.