DayPilot.Calendar.onEventMoved

The JavaScript Calendar component fires the onEventMoved event handler when drag and drop event moving is completed (on drop), after the default action.

The default action is specified using the eventMoveHandling property - by default it is set to "Update" which means the event will be rendered at the new location.

See also the onEventMove event handler which is fired before the default action.

This event is available in the open-source version of the calendar component as well.

Declaration

DayPilot.Calendar.onEventMoved(args);

Parameters

  • args.e - DayPilot.Event object representing the calendar event
  • args.newStart - the new event start (DayPilot.Date)
  • args.newEnd - the new event end (DayPilot.Date)
  • args.newResource - the ID of the new resource (in resource calendar mode)
  • args.external - a boolean value indicating the the event was dragged from an external source (Pro version only)
  • args.ctrl - status of the Ctrl key (boolean)
  • args.shift - status of the Shift key (boolean)

Example

dp.onEventMoved = (args) => {
  console.log("Moved: " + args.e.text());
};