Can I set start time in minutes? DHTMLX gantt doesnt seem to allow this

I’ve set my “duration_unit” as minutes". However when I try to set the start time of a task (or to drag a task to a start time), gantt only allows me to set start times that are at the nearest hour.

How can I set start times in minutes?

The other problem I have is that though I can set the duration in minutes in the lightbox, if I try to use the timeline to resize a task … it again forces me to have tasks that are an integer multiple of hours.

Hello David,
By default, Gantt rounds the dates to the nearest scale.
If you want to change it, you need to turn off the round_dnd_dates parameter:
https://docs.dhtmlx.com/gantt/api__gantt_round_dnd_dates_config.html
Also, you need to change the time_step parameter:
https://docs.dhtmlx.com/gantt/api__gantt_time_step_config.html

Here is an example of how it works:
http://snippet.dhtmlx.com/5/41334ee12

To set the start_date with minutes in the lightbox, you need to configure the time_format parameter in the lightbox section:
https://docs.dhtmlx.com/gantt/desktop__duration.html
Here is the snippet:
http://snippet.dhtmlx.com/5/02ea30400

You can also add the minute scale, then the lightbox will show the minute select without additional configuration:
http://snippet.dhtmlx.com/5/6bfce50b8

Hi @ramil
Thanks for your response. Your suggestion, in combination with gantt.config.time_step, gave me the added control I needed.

Thank you for your prompt response. The support you give goes a long way towards helping us to evaluate the use of DHTMLX gantt, and other tools.

Regards,
Dave

1 Like