Confusing example end display date documentation

In the scenario 2, it states the end date is april 3, but the data in the example shows april 2. Am I missing something?

Work Time Calculation Gantt Docs

Hello,
If I understand correctly, you’re referring to this scenario:
https://docs.dhtmlx.com/gantt/desktop__loading.html#:~:text=will%20be%200.-,Scenario%202,-When%20the%20End

In Gantt, the end date is stored as the start of the day after the task finishes. For example, a task starting on April 2 and lasting 1 day will have:

  • start_date = “April 2, 00:00”
  • end_date = “April 3, 00:00”

That’s why the example shows April 3 as the end date — it marks the beginning of the next day.

This is the default behavior and can be adjusted via configuration if needed.

More detailed explanation is here:
https://docs.dhtmlx.com/gantt/desktop__loading.html#:~:text=How%20does%20Gantt%20store%20end%20dates
How to change the default behavior is described here:
https://docs.dhtmlx.com/gantt/desktop__loading.html#:~:text=How%20to%20change%20the%20default%20behavior

but that’s not what the example shows…

Hello,
Thank you for pointing this out. This is a typo in the documentation.
It should be:

gantt.parse({ tasks: [
    { 
        id: 1,
        text: "Task 1",
        start_date: "02-04-2020",
        end_date: "03-04-2020" 
    }
]}, links: []);

We’ll correct it in a future documentation update.