The stopDragging() method cancels an active drag-and-drop operation in the JavaScript Calendar component.
Available since 2022.3.5416.
Declaration
DayPilot.Calendar.stopDragging()Notes
Call this static method to cancel operations such as event moving, event resizing, external drag and drop, or time range selecting.
Example
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();
}
});See Also
Event Moving [doc.daypilot.org]
Event Resizing [doc.daypilot.org]
External Drag and Drop [doc.daypilot.org]
Time Range Selecting [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot