The multiselect.clear() method clears the current multi-selection of events in the Calendar.
DayPilot.Calendar.multiselect.clear(dontRedraw)dontRedraw (boolean) - set to true if the calendar should not be updated automatically using DayPilot.Calendar.multiselect.redraw()
This method replaced DayPilot.Calendar.getEventSelection().
Set dontRedraw to true when you plan to call DayPilot.Calendar.multiselect.redraw() manually after additional selection changes.
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();
});DayPilot.Scheduler.multiselect.redraw()
Event Selecting [doc.daypilot.org]