More dates when dragging a task


I have a problem with Gantt. If the task duration (both start and finish dates) are not in the frame, How can I drag it to the next dates which are not shown in the frame?

For example, in the following sample, I want to drag Task’s finish date to 20 May with mouse.

Hi @ma_albert!

Each time a timeline scale changes its start_date and end_date values the render() method is called, which is quite resource-intensive. Therefore, the values ​​of the boundaries of the scale are static by default.

You can set the fit_tasks property to true. It ‘says’ the Gantt chart to automatically extend the time scale in order to fit all displayed tasks. Here is a related article:
Here is a gif you can see how it can be used:

You can also extend scaled dynamically during drag and drop, by repainting gantt from onTaskDrag event, here is a working demo:
But please keep in mind that it can work slowly on large charts.

You can configure gantt.config.start_date and gantt.config.end_date property to change the range.
Here are the related articles, snippet and GIF:

Here is the article about the timeline scale range: