DayPilot.Calendar.stopDragging

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

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript