DayPilot.Calendar.multiselect.clear

The multiselect.clear() method clears the current multi-selection of events in the Calendar.

Declaration

DayPilot.Calendar.multiselect.clear(dontRedraw)

Parameters

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]

DayPilot.Calendar Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript