The selectedClass property (string) specifies the CSS class that will be added to a trigger when it is selected. When another trigger is activated, the CSS class is removed from the previous trigger and added to the new active trigger.
DayPilot.Switcher.selectedClassDefine the CSS class in your stylesheet and assign its name using selectedClass.
The switcher uses this class to keep the currently active trigger visually highlighted.
const day = new DayPilot.Calendar("dpDay", {
viewType: "Day",
// ...
});
day.init();
const week = new DayPilot.Calendar("dpWeek", {
viewType: "Week",
// ...
});
week.init();
const switcher = new DayPilot.Switcher({
selectedClass: "switcher-selected",
triggers: [
{ id: "buttonDay", view: day },
{ id: "buttonWeek", view: week }
]
});