The DayPilot.Scheduler.stopDragging() method cancels any active drag and drop operation (JavaScript Scheduler):
DayPilot.Scheduler.stopDragging()
This method needs to be called as a static method, not on a DayPilot.Scheduler instance:
DayPilot.Scheduler.stopDragging();
Use the escape key to cancel drag and drop:
window.addEventListener("keydown", function(ev) { if (ev.key === "Escape") { DayPilot.Scheduler.stopDragging(); } });