include end_date as workday in calculation (or task-display)


In our application, we work with tasks which have an end_date which is included in the calculation. But in the Gantt functionality, the end_date is NOT included. How can I change this?

I could do end_date + 1, but then the incorrect enddate is shown in the gridarea.
option a) is there a way that I can change the functionality in the gridarea for showing end_date -1, so the task area can use the new end_date?

I could also do start_date + duration, but then the end_date is incorrect (because in our duration, the end_date is included). I could do duration+1, but then in my grid-area (where I show duration) the duration is incorrect.
option b) is there a way that I can change the duration in the gridarea for showing duration -1, so the task area can use the new duration?

Or as a workaround:
option c) is there a way that I can display the end_date in the gridarea, but in the task-area use the end_date+1?


probably the easiest way would be to modify end date display in grid: … esentation

Apart of this, we do not have a reliable solution for inclusive dates for now


Five years later and the end date is still not inclusive. To include the end date (the day when a task should complete) is an extremely common scenario - virtually in every project management tool known to man - and yet, DHTMLX Gantt insists that end dates are not inclusive. Is there an architect/technical lead who is responsible for this decision that can explain why not? I can give you plenty of reasons why this should be the case.


Hello Sai,
There is no way to change how Gantt stores the dates internally. But you can change how it is displayed for the user by using the task_end_date template:

You can see how it works in the following snippet:


I’m well aware of this workaround. It forces the rest of our application to also have to constantly reinterpret end dates e.g. all the other places where the date is displayed - for example, a Kanban board that shows a task from the Gantt as a card with a due date. This is quite asinine and creates bugs and quality issues - all because one component in the app (the Gantt chart) - has this strange date requirement.

Just so you guys understand that this is not just developer feedback - one of our customers asked a project manager if she was asking him to work on a weekend. The task was supposed to end on Friday but of course, it has to be set to Saturday for DHTMLX Gantt to work right. Yes, the onus is on the developers to have to adjust this so that the app does not display “Saturday” anywhere in the UI or the mobile interface etc etc. As a technical architect and developer, I find it hard to believe that there is a really meaningful reason for this design choice, or a real reason why it cannot be implemented. Maybe the feedback from this forum simply does not go to the product team?


Hello Sai,
Thank you for the feedback. I forwarded it to the dev team.