The onRowMoved event handler fires when the user finishes drag-and-drop row moving in the JavaScript Scheduler, after the default action configured by rowMoveHandling has been performed.
DayPilot.Scheduler.onRowMoved(args)args.external (boolean) - indicates that the row was dragged from an external source, such as a custom draggable item or another Scheduler instance
args.source (DayPilot.Row) - dragged row
args.target (DayPilot.Row) - target row
args.position ("child" | "before" | "after" | "forbidden") - drop position relative to the target row
Possible values of args.position:
"child" - drops the row as a child of the target row
"before" - drops the row before the target row
"after" - drops the row after the target row
"forbidden" - the current target does not allow dropping the row
JavaScript
const dp = new DayPilot.Scheduler("dp", {
onRowMoved: (args) => {
console.log("Row moved", args.source, args.position, args.target);
if (args.external) {
console.log("The row came from an external source.");
}
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
onRowMoved: (args) => {
console.log("Row moved", args.source, args.position, args.target);
if (args.external) {
console.log("The row came from an external source.");
}
},
// ...
};React
<DayPilotScheduler
onRowMoved={onRowMoved}
{/* ... */}
/>const onRowMoved = (args) => {
console.log("Row moved", args.source, args.position, args.target);
if (args.external) {
console.log("The row came from an external source.");
}
};Vue
<DayPilotScheduler
@rowMoved="onRowMoved"
<!-- ... -->
/>const onRowMoved = (args) => {
console.log("Row moved", args.source, args.position, args.target);
if (args.external) {
console.log("The row came from an external source.");
}
};Row Moving [doc.daypilot.org]
DayPilot.Scheduler.onRowMoving