The events.load() method loads event data for the current view from the specified URL.
Declaration
DayPilot.Switcher.events.load(url[, success[, error]])Parameters
url(string) - URL that will be passed to the current viewsuccess(function) - success callback passed to the current view'sevents.load()methoderror(function) - error callback passed to the current view'sevents.load()method
Notes
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.
Example
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");See Also
DayPilot.Calendar.events.load()
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot