How to dynamically extend config.start_date and config.end_date when dragging a timeline beyond config date range


#1

I’ve a big issue with latest version.
We allow users to zoom-in a specified date range, to implement this feature, we dynamically set config.start_date and end_date and re-render the chart which is working fine.
And we also allow users to edit task timelines by dragging them. The problem is that users cannot drag the timelines beyond the date range of config.start_date and end_date.
I check https://docs.dhtmlx.com/gantt/snippet/d3c07958 to dynamically extend config.start_date and end_date, but it seems not to work as expected.

https://docs.dhtmlx.com/gantt/samples/03_scales/08_scale_autoconfig.html is not a good solution since user’s dragging timeline out-of displayed date range is not smoothly - have to drop to force re-rendering and re-dragging and so on.

Appreciated for a workaround


How can I extend the date display of the Gantt chart
#2

Hello Yong,
Looks like, you need to extend the timeline when the date range (global start_date and end_date parameters) is specified. Here is a snippet:
https://snippet.dhtmlx.com/a59330d16


#3

Thanks, it’s a good workaround even though dragging is not smooth as normal.


#4

Hello Yong,
Yes, every time you extend the timeline, Gantt renders the chart and create new elements. It might affect the performance if you have many tasks. So you can apply the tips from the following article:
https://docs.dhtmlx.com/gantt/desktop__performance.html