gantt.date.parseDate gives strange result

I have a json structure with various dates inside of it.
start_date, end_date, another_start_date, another_end_date.

I want to display baselines based on the other two dates using this approach.

var startDateOriginal =  gantt.date.parseDate(task.start_date_original, gantt.config.task_date);
            var endDateOriginal = gantt.date.parseDate(task.end_date_original, gantt.config.task_date);

however this function always return a date with a month of January. the year and the day are corrent.

any solution?

Hello,
Have you specified the task_date parameter? The default value of that parameter is "%d %F %Y". So that instead of Month number (e.g. 09) there is the full name of that month (e.g. October) and you might get the first month after value type conversion.

There is the snippet where I use “xml_date” as the date format:
https://snippet.dhtmlx.com/0157f969f
And there is another snippet where I tried to reproduce your case:
http://snippet.dhtmlx.com/8af7e839b

Articles for the reference:
https://docs.dhtmlx.com/gantt/desktop__date_format.html
https://docs.dhtmlx.com/gantt/api__gantt_task_date_config.html
https://docs.dhtmlx.com/gantt/api__gantt_date_other.html
https://docs.dhtmlx.com/gantt/api__gantt_xml_date_config.html