DayPilot.Switcher.onChange

The onChange event is fired when the switcher detects a change of the selected date.

This event is fired before the actual date change and it lets you cancel it.

Declaration

DayPilot.Switcher.onChange(args);

Parameters

  • args.start (DayPilot.Date) - start date of the new selection
  • args.end (DayPilot.Date) - end date of the new selection
  • args.day (DayPilot.Date) - the day that was selected
  • args.target - the target view component (DayPilot.Calendar or DayPilot.Month)
  • args.preventDefault() - cancels the default action (date change)