Difference between dates


#1

Hi, I have many tasks with start and end date with the same date. e.g: start_date: 03/12/2018 and end_date: 03/12/2018. The difference between them is 0 (in duration), but as we work here, the difference between those dates need to be 1. How can I handle this configuration?


#2

Hello,
It happens because the duration is not inclusive. And Gantt doesn’t have a built-in feature to change that behaviour. But there are various ways to implement that using Gantt API and Javascript.
One of the easiest is to subtract 1 minute from the task’s end_date before updating the task:
http://snippet.dhtmlx.com/a73af08c3


#3

Thank you so much! I did what you said and it was the solution.