The multiselect.clear() method clears the current multi-selection of events in the Calendar.
Declaration
DayPilot.Calendar.multiselect.clear(dontRedraw)Parameters
dontRedraw(boolean) - set totrueif the calendar should not be updated automatically using DayPilot.Calendar.multiselect.redraw()
Notes
This method replaced DayPilot.Calendar.getEventSelection().
Set dontRedraw to true when you plan to call DayPilot.Calendar.multiselect.redraw() manually after additional selection changes.
Example
Clear the current selection from a custom button handler.
<button id="clear">Clear selection</button>
const dp = new DayPilot.Calendar("dp", {
// ...
});
dp.init();
document.querySelector("#clear").addEventListener("click", () => {
dp.multiselect.clear();
});See Also
DayPilot.Scheduler.multiselect.redraw()
Event Selecting [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot