The onTaskResizing event handler fires repeatedly during drag and drop task box resizing in the Gantt Chart, whenever the task duration changes.
DayPilot.Gantt.onTaskResizing(args)args.task - DayPilot.Task object representing the task.
args.start (DayPilot.Date) - current start position.
args.end (DayPilot.Date) - current end position.
args.left.html (string) - HTML of the start indicator.
args.left.enabled (boolean) - whether the start indicator should be displayed.
args.right.html (string) - HTML of the end indicator.
args.right.enabled (boolean) - whether the end indicator should be displayed.
JavaScript
const gantt = new DayPilot.Gantt("dp", {
taskResizeHandling: "Update",
onTaskResizing: (args) => {
args.left.html = args.start.toString("d MMMM yyyy");
args.right.html = args.end.toString("d MMMM yyyy");
},
// ...
});
gantt.init();Angular
<daypilot-gantt [config]="config"></daypilot-gantt>config: DayPilot.GanttConfig = {
taskResizeHandling: "Update",
onTaskResizing: args => {
args.left.html = args.start.toString("d MMMM yyyy");
args.right.html = args.end.toString("d MMMM yyyy");
},
// ...
};React
<DayPilotGantt
taskResizeHandling="Update"
onTaskResizing={onTaskResizing}
{/* ... */}
/>const onTaskResizing = (args) => {
args.left.html = args.start.toString("d MMMM yyyy");
args.right.html = args.end.toString("d MMMM yyyy");
};Vue
<DayPilotGantt
taskResizeHandling="Update"
@taskResizing="onTaskResizing"
<!-- ... -->
/>const onTaskResizing = (args) => {
args.left.html = args.start.toString("d MMMM yyyy");
args.right.html = args.end.toString("d MMMM yyyy");
};