How to drag and drop unscheduled tasks to modify the task time

How to drag and drop unscheduled tasks to modify the task time

Hello,
When a task is unscheduled, it is not displayed in the timeline.
You can use the click_drag extension to draw a bar and specify the dates. After that, the task will be scheduled and Gantt will display it in the timeline.
https://docs.dhtmlx.com/gantt/desktop__advanced_dnd.html
Here is an example of how it can be implemented:
https://snippet.dhtmlx.com/5/f16021d14

If you need something different, please, describe your question in more detail.

Hello, your reply is very useful to me, but I encountered a new problem in use. When I drag an unplanned task beyond the Gantt chart area, because not obtain endDate, an error will be reported。How to solve this problem?I look forward to your reply。

Hello,
Thank you for the clarification.
It seems to be a bug in Gantt. I added it to our internal tracker. The dev team will fix it in the future, but I cannot give you any ETA.

As a workaround, you can modify the end_date in the onBeforeDragEnd event handler:
http://snippet.dhtmlx.com/5/46f99e587

Hello,
The dev team fixed the bug with the click_drag extension. Now, it doesn’t throw an error if you start drawing a bar and release the mouse button outside the Gantt container.
https://docs.dhtmlx.com/gantt/whatsnew.html#714
You can check how it works in the following snippet:
https://snippet.dhtmlx.com/5/944d57d6c