Answer posted by Dan Letecky [DayPilot]
5 years ago.

The tutorial is now updated and it will keep the duration of both events after they are swapped:

  var targetDuration = targetEvent.duration();

  targetEvent.data.start = sourceEvent.data.start;
  targetEvent.data.end = targetEvent.start().addTime(targetDuration);
  targetEvent.data.resource = sourceEvent.data.resource;

https://code.daypilot.org/42265/javascript-scheduler-swapping-events-drag-and-drop

This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.