DayPilot.Scheduler.onEventMoved

The onEventMoved event handler fires when an event is dropped at a new location during moving, after the default action configured by eventMoveHandling has been executed.

See also onEventMove.

Declaration

DayPilot.Scheduler.onEventMoved(args)

Parameters

  • args.areaData - value of the data property of the active area used as the drag handle

  • args.e - event object (DayPilot.Event)

  • args.multimove - array of all events being moved during multi-moving, including their new positions

  • args.newStart - target start (DayPilot.Date)

  • args.newEnd - target end (DayPilot.Date)

  • args.newResource - target resource ID (number | string)

  • args.external - external source status (boolean)

  • args.ctrl - Ctrl key pressed status (boolean)

  • args.shift - Shift key pressed status (boolean)

  • args.meta - Meta key pressed status (boolean)

  • args.position - see event position

Items in args.multimove have the following structure:

  • args.multimove[].event - DayPilot.Event object

  • args.multimove[].start - new start (DayPilot.Date)

  • args.multimove[].end - new end (DayPilot.Date)

  • args.multimove[].resource - new resource (string | number)

Notes

The args.multimove array includes the main event as well (args.e). The args.e object is already updated and uses the newStart, newEnd, and newResource values.

Examples

JavaScript

const dp = new DayPilot.Scheduler("dp", {
  onEventMoved: (args) => {
    dp.message("Moved: " + args.e.text());
  },
  // ...
});
dp.init();

Angular

<daypilot-scheduler [config]="config"></daypilot-scheduler>
config: DayPilot.SchedulerConfig = {
  onEventMoved: (args) => {
    DayPilot.Modal.alert("Moved: " + args.e.text());
  },
  // ...
};

React

<DayPilotScheduler
  onEventMoved={onEventMoved}
  {/* ... */}
/>
const onEventMoved = (args) => {
  DayPilot.Modal.alert("Moved: " + args.e.text());
};

Vue

<DayPilotScheduler
  @eventMoved="onEventMoved"
  <!-- ... -->
/>
const onEventMoved = (args) => {
  DayPilot.Modal.alert("Moved: " + args.e.text());
};

See Also

Event Moving [doc.daypilot.org]

DayPilot.Scheduler.onEventMove

DayPilot.Scheduler.eventMoveHandling

DayPilot.Scheduler Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript

Lite args missing: external, multimove, position