how to calculate duration using start and end dates?

Hi,

Can we calculate the duration of the task using the task start date and end date?

Hi,

Use calculateDuration method
docs.dhtmlx.com/gantt/api__gantt … ation.html

Hi,
I have StartDate and EndDate in display, I want in display pick EndDate will change duration auto caculate, where find it ? thanks :smiley:

Hi @sailam94,
Sorry, I don’t think I understand what exactly do you mean by want in display pick EndDate. Could you clarify what does “display” and “pick” exactly mean in your post, and what exactly do you want to achieve?
btw, maybe you meant inline editing from grid cells, like in this sample?
https://docs.dhtmlx.com/gantt/samples/07_grid/12_inline_edit_key_nav.html

1 Like

@Siarhei Thanks you support me, I have found the answer :smiley:

1 Like