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.
Declaration
DayPilot.Switcher.selectedClassNotes
Define 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.
Example
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 }
]
});See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot