About the end time display when dragging a task

When dragging a project, the end time of the drag will always be one day shorter than the end time displayed on the right side. Why is this, how can I solve it?


Hello,
It might happen because of several reasons.

  1. Task duration is not inclusive. If a task starts at 2018-08-23 and its duration is 1, then it means that its end date is 2018-08-24.
    But also by default the start time is 0:00 if it is not specified. At that time new day is started, but you do not see it in the chart. It is not easy to change that logic, instead you can change what is displayed in the grid:
    snippet.dhtmlx.com/56cdbebba

  2. By default tasks snap to the cells. If you want to turn it off, you can change the following option:

gantt.config.round_dnd_dates = false;

Here is an example:
snippet.dhtmlx.com/912da0f58
Please note that it doesn’t change actual task dates, it only allows you to drag and resize the task to any position in the chart. For that you probably need to change the following options:
docs.dhtmlx.com/gantt/api__gant … onfig.html
docs.dhtmlx.com/gantt/api__gant … onfig.html
docs.dhtmlx.com/gantt/desktop__ … scale.html