The onTaskMoving event handler fires repeatedly during drag and drop task box moving in the Gantt Chart, whenever the position changes.
DayPilot.Gantt.onTaskMoving(args)args.allowed (boolean) - determines whether the task can be dropped at the current location. Read/write.
args.control (DayPilot.Gantt) - component reference.
args.ctrl (boolean) - true if the Ctrl key is pressed. Read-only.
args.shift (boolean) - true if the Shift key is pressed. Read-only.
args.meta (boolean) - true if the Meta key is pressed. Read-only.
args.alt (boolean) - true if the Alt key is pressed. Read-only.
args.cssClass (string) - CSS class added to the moving shadow. Read/write.
args.duration (DayPilot.Duration) - task duration.
args.html (string) - inner HTML of the shadow object.
args.multimove - array of all tasks being moved during multi-moving, including their new positions.
args.task - DayPilot.Task object representing the task. Read-only.
args.start (DayPilot.Date) - current start position. Read/write.
args.end (DayPilot.Date) - current end position. Read/write.
args.left.html (string) - HTML of the start indicator. Read/write.
args.left.enabled (boolean) - whether the start indicator should be displayed. Read/write.
args.right.html (string) - HTML of the end indicator. Read/write.
args.right.enabled (boolean) - whether the end indicator should be displayed. Read/write.
JavaScript
const gantt = new DayPilot.Gantt("dp", {
taskMoveHandling: "Update",
onTaskMoving: (args) => {
args.left.html = args.start.toString("d MMMM yyyy");
},
// ...
});
gantt.init();Angular
<daypilot-gantt [config]="config"></daypilot-gantt>config: DayPilot.GanttConfig = {
taskMoveHandling: "Update",
onTaskMoving: args => {
args.left.html = args.start.toString("d MMMM yyyy");
},
// ...
};React
<DayPilotGantt
taskMoveHandling="Update"
onTaskMoving={onTaskMoving}
{/* ... */}
/>const onTaskMoving = (args) => {
args.left.html = args.start.toString("d MMMM yyyy");
};Vue
<DayPilotGantt
taskMoveHandling="Update"
@taskMoving="onTaskMoving"
<!-- ... -->
/>const onTaskMoving = (args) => {
args.left.html = args.start.toString("d MMMM yyyy");
};