The events.load() method loads event data for the current view from the specified URL.
DayPilot.Switcher.events.load(url[, success[, error]])url (string) - URL that will be passed to the current view
success (function) - success callback passed to the current view's events.load() method
error (function) - error callback passed to the current view's events.load() method
This method calls the events.load() method of the current view. Depending on the selected view, that is DayPilot.Calendar.events.load() or DayPilot.Month.events.load().
See the methods above for a detailed description of the parameters.
const day = new DayPilot.Calendar("dpDay", {
// ...
});
day.init();
const month = new DayPilot.Month("dpMonth", {
// ...
});
month.init();
const switcher = new DayPilot.Switcher({
triggers: [
{ id: "buttonDay", view: day },
{ id: "buttonMonth", view: month },
],
});
switcher.events.load("/calendar_events.php");