DayPilot.Month.onEventMoved

The onEventMoved event handler fires after the user drops an event at the target location in the monthly calendar during drag and drop event moving.

This event is called after the default action set using DayPilot.Month.eventMoveHandling. When this handler runs, the event is already moved to the target location in the UI.

See also DayPilot.Month.onEventMove, which fires before the default action.

Declaration

DayPilot.Month.onEventMoved(args)

Parameters

  • args.e (DayPilot.Event) - the event being moved

  • args.newStart (DayPilot.Date) - the new event start

  • args.newEnd (DayPilot.Date) - the new event end

  • args.ctrl (boolean) - state of the Ctrl key on drop

  • args.meta (boolean) - state of the Meta key on drop (available since 2023.3.5604)

  • args.shift (boolean) - state of the Shift key on drop

  • args.position (number) - target vertical position of the event within a cell in the cell stacking mode

Examples

JavaScript

const dp = new DayPilot.Month("dp", {
  onEventMoved: (args) => {
    console.log("Moved:", args.e.text(), args.newStart, args.newEnd);
  },
  // ...
});
dp.init();

Angular

<daypilot-month [config]="config"></daypilot-month>
config: DayPilot.MonthConfig = {
  onEventMoved: (args) => {
    console.log("Moved:", args.e.text(), args.newStart, args.newEnd);
  },
  // ...
};

React

<DayPilotMonth
  onEventMoved={onEventMoved}
  {/* ... */}
/>
const onEventMoved = (args) => {
  console.log("Moved:", args.e.text(), args.newStart, args.newEnd);
};

Vue

<DayPilotMonth
  @eventMoved="onEventMoved"
  <!-- ... -->
/>
const onEventMoved = (args) => {
  console.log("Moved:", args.e.text(), args.newStart, args.newEnd);
};

See Also

Event Moving [doc.daypilot.org]

DayPilot.Month.onEventMove

DayPilot.Month.onEventMoved

DayPilot.Month.eventMoveHandling

DayPilot.Month Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript

Lite args missing: external, position