Getting wrong dates when using gantt.getState()

Hi,

Please check this snippet once.

http://docs.dhtmlx.com/gantt/snippet/9916bc3c

When I try to get the gantt.getState() it returns wrong date where as when I use gantt.getSubtaskDates() I get the correct dates of the project.

Can you please tell me why this is happening?

Hi,
gantt.getState() contains date range that is currently shown in timeline time scale, while gantt.getSubtaskDates() shows date range of all task loaded into gantt. I.e. these methods show different settings of the gantt

ok.

But if the gantt.getState() shows the range of dates then it should start the with the dates that are loaded in the gantt?

No, It shows the range of timescale dates, which generally differs from the date range of loaded tasks since scale can rounded to specified time units (day/month/year), or can be specified explicitly using start_date/end_date configs.
Currently getState result does not contain date range of tasks loaded into gantt, this date range has to be be retrieved using other method of public api - gantt.getSubtaskDates