round_dnd_dates doesn't seem to be working

I made a simple gantt chart that imports one task and that’s it.
{ “id”: 1, “text”: “Procedure #1”, “start_date”: “01-03-2013 18:30:02”, “end_date”: “01-03-2013 18:35:25”, “open”: true}

It creates a very small 5 minute task. If I drag this task it snaps into a full day. I have set gantt.config.round_dnd_dates = false; in my code yet it still snaps into a full day. I’ve stepped through my code and confirmed the line of code is getting hit, yet nothing has changed. Is there a particular spot I should be putting this code or what am I missing?

Hi,
try using ‘minutes’ as a duration unit of a gantt chart. By default gantt calculates duration of task in days
docs.dhtmlx.com/gantt/snippet/31ccc191

docs.dhtmlx.com/gantt/api__gantt … onfig.html

I have the duration set to minutes but unfortunately when I slide the task it now jumps back to the previous minute (ie. task starts at 7:00am but sliding the task makes it jump back to 6:59am).

A co-worker here was able to reproduce the issue and created this jsfiddle for you to look at:

jsfiddle.net/lhalverson/zqkh7hz3/6/

Basically if you drag ‘task1’ even a fraction of a millimeter it will snap into the previous minute (ie it initally started at 7:30am but will snap into the 7:29 spot. Drag it again and it will move to 7:28, etc.

Hi,
by default gantt does not support the seconds and a decimal values of a duration_step.
So you can only get it work with a minute precision (it will require setting a couple of configs and defining ‘date.minute_start’ method)
jsfiddle.net/vv64gq6a/1/

If you are ok with redefining inner methods of gantt, you can try overwrite the inner method that finalizes drag and drop, seems like it allows dragging dates with second precision

jsfiddle.net/vv64gq6a/2/

However, it is not tested functionality, I’m not sure it will work as expected in all use-cases