Work_time and critical path

Hello team,

How is gantt.config.work_time and critical path calculation related to each other?
When I set work_time = true, the critical path is showing correctly as expected. But when I update the work_time = false (which is my project requirement), the critical path is not showing up.
Is it possible to keep the setting as work_time = false and still have the gantt calculate the critical path?

Hello Monika,
The critical path feature can work correctly even without the working time feature:
https://snippet.dhtmlx.com/9g62vbxg

However, I suppose you have this situation: task A ends on a weekend and task B starts on the following working day. When the work_time config is enabled, the duration between the tasks is 0, because the weekends are excluded.
But when you disable the work_time config, the weekends are no loner excluded, so the duration between the tasks is 2. And according to the critical path logic, task A is no longer critical:
https://docs.dhtmlx.com/gantt/desktop__critical_path.html#criticalpathlogic

You can reproduce this behavior in the following snippet:
https://snippet.dhtmlx.com/o2pmilhv

If you have this situation, it works as expected. So, if you want to change how it works, you need to implement a custom solution. But as I don’t know what you actually want, I cannot suggest how it should be done.

If you have a different use case, please add your configuration to the following snippet and make sure that the issue is reproduced there:

Then, click on the Save button and send me the link.
Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.