The stopDragging() method cancels an active drag-and-drop operation in the JavaScript Calendar component.
Available since 2022.3.5416.
DayPilot.Calendar.stopDragging()Call this static method to cancel operations such as event moving, event resizing, external drag and drop, or time range selecting.
This is a static method, so call it on DayPilot.Calendar, not on a calendar instance.
DayPilot.Calendar.stopDragging();The following example handles the Escape key and cancels the current drag-and-drop action:
window.addEventListener("keydown", (ev) => {
if (ev.key === "Escape") {
DayPilot.Calendar.stopDragging();
}
});Event Moving [doc.daypilot.org]
Event Resizing [doc.daypilot.org]
External Drag and Drop [doc.daypilot.org]
Time Range Selecting [doc.daypilot.org]