DayPilot.Queue.onEventMove

The onEventMove event handler fires when the user drops a queue item after moving it. You can inspect the target position and cancel the default move action before it is applied.

Declaration

DayPilot.Queue.onEventMove(args)

Parameters

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

  • args.external (boolean) - external source status

  • args.position (number) - target vertical position

  • args.source (DayPilot.Queue | DayPilot.Scheduler) - source component

  • args.preventDefault() - cancels the default action

Notes

Use args.external and args.source to distinguish drops coming from another component. If you need to block the move, call args.preventDefault() here before the Queue updates the item. For post-update logic, handle DayPilot.Queue.onEventMoved instead.

Examples

JavaScript

const dp = new DayPilot.Queue("dp", {
  onEventMove: (args) => {
    if (args.external) {
      args.preventDefault();
      DayPilot.Modal.alert("External drop forbidden");
    }
  },
  // ...
});
dp.init();

Angular

<daypilot-queue [config]="config"></daypilot-queue>
config: DayPilot.QueueConfig = {
  onEventMove: (args) => {
    if (args.external) {
      args.preventDefault();
      DayPilot.Modal.alert("External drop forbidden");
    }
  },
  // ...
};

React

<DayPilotQueue
  onEventMove={onEventMove}
  {/* ... */}
/>
const onEventMove = (args) => {
  if (args.external) {
    args.preventDefault();
    DayPilot.Modal.alert("External drop forbidden");
  }
};

Vue

<DayPilotQueue
  @eventMove="onEventMove"
  <!-- ... -->
/>
const onEventMove = (args) => {
  if (args.external) {
    args.preventDefault();
    DayPilot.Modal.alert("External drop forbidden");
  }
};

See Also

DayPilot.Queue.onEventMoved

DayPilot.Queue Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript