DHTMLX Docs & Samples Explorer

onTaskResizing

onTaskResizing event is fired while user is resizing a Task item.

One parameter is passed to the handler:

  • task - GanttTask object which is being resized.
  • newHours - int, new length of Task (in hours)

You may return false from this handler to stop resizing.

    var maxHours = 100;
    ganttChartControl.attachEvent("onTaskResizing", function(task, newHours) {
        // Limit maximum task length to maxHours
        if (newHours > maxHours) return false;
    });