The onTaskMoved event handler fires when the user finishes drag and drop task box moving in the Gantt Chart, after the default action specified by taskMoveHandling.
DayPilot.Gantt.onTaskMoved(args)args.task - DayPilot.Task object representing the task.
args.newStart (DayPilot.Date) - new task start.
args.newEnd (DayPilot.Date) - new task end.
args.external (boolean) - indicates an external source of the task.
args.ctrl (boolean) - true if the Ctrl key is pressed.
args.shift (boolean) - true if the Shift key is pressed.
JavaScript
const gantt = new DayPilot.Gantt("dp", {
taskMoveHandling: "Update",
onTaskMoved: (args) => {
DayPilot.Modal.alert("Moved to: " + args.newStart.toString());
},
// ...
});
gantt.init();Angular
<daypilot-gantt [config]="config"></daypilot-gantt>config: DayPilot.GanttConfig = {
taskMoveHandling: "Update",
onTaskMoved: args => {
DayPilot.Modal.alert("Moved to: " + args.newStart.toString());
},
// ...
};React
<DayPilotGantt
taskMoveHandling="Update"
onTaskMoved={onTaskMoved}
{/* ... */}
/>const onTaskMoved = (args) => {
DayPilot.Modal.alert("Moved to: " + args.newStart.toString());
};Vue
<DayPilotGantt
taskMoveHandling="Update"
@taskMoved="onTaskMoved"
<!-- ... -->
/>const onTaskMoved = (args) => {
DayPilot.Modal.alert("Moved to: " + args.newStart.toString());
};