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.
DayPilot.Queue.onEventMove(args)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
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.
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");
}
};