The select() method selects the specified view using its trigger.
DayPilot.Switcher.select(trigger)trigger (string) - ID of the trigger DOM element
const day = new DayPilot.Calendar("dpDay", {
// ...
});
day.init();
const week = new DayPilot.Calendar("dpWeek", {
// ...
});
week.init();
const switcher = new DayPilot.Switcher({
triggers: [
{ id: "buttonDay", view: day },
{ id: "buttonWeek", view: week },
],
});
switcher.select("buttonWeek");