DayPilot.Switcher.onChanged

The onChanged event handler fires when the switcher detects a change of the selected date, after the actual date change has been applied.

Declaration

DayPilot.Switcher.onChanged(args)

Parameters

Example

const nav = new DayPilot.Navigator("nav", {
  // ...
});
nav.init();

const day = new DayPilot.Calendar("dpDay", {
  // ...
});
day.init();

const week = new DayPilot.Calendar("dpWeek", {
  // ...
});
week.init();

const month = new DayPilot.Month("dpMonth", {
  // ...
});
month.init();

const switcher = new DayPilot.Switcher({
  triggers: [
    { id: "buttonDay", view: day },
    { id: "buttonWeek", view: week },
    { id: "buttonMonth", view: month }
  ],
  navigator: nav,
  onChanged: (args) => {
    switcher.events.load("calendar_events.php");
  }
});

switcher.select("buttonWeek");

See Also

DayPilot.Switcher.onChange

DayPilot.Switcher.onSelect

DayPilot.Switcher Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript