Skip to main content

change

fires on change of date selection

change: (date: Date, oldDate: Date, byClick: boolean) => void;

Parameters:

  • date: Date - the newly selected date. If the selection is cleared, an empty string
  • oldDate: Date - the previously selected date
  • byClick: boolean - defines whether the change happened because of a click on a date or on the "today" or "clear" control - true, or due to an API call - false

Example

calendar.events.on("change",function(date, oldDate, byClick){
console.log("Change selection from "+oldDate+" to "+date);
console.log(click);
});

Related sample: Calendar. Events

Related API:

Related article: Event handling