DayPilot.Scheduler.onRowMoved

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.

Declaration

DayPilot.Scheduler.onRowMoved(args)

Parameters

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

Examples

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.");
  }
};

See Also

Row Moving [doc.daypilot.org]

DayPilot.Scheduler.onRowMoving

DayPilot.Scheduler.rowMoveHandling

DayPilot.Scheduler Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript