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 objectargs.external(boolean) - external source statusargs.position(number) - target vertical positionargs.source(DayPilot.Queue | DayPilot.Scheduler) - source componentargs.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
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot