Dataprocessor passes the wrong format date in the data


#1

I have a dataprocessor connected to the gantt. But even though I changed the date_format in the config to “%d/%m/%Y” yet Im getting in the data processor the start_date of the task in the format of: “13-12-2020 12:05”

I tested it by putting a debugger in the dataprocessor like so:

In the time of the debugger, I checked what the config date is and its “%d/%m/%Y” but the ‘data.start_date’ which I get from the data processor is “13-12-2020 12:05”:

image

I did try to reproduce, but could not: http://snippet.dhtmlx.com/5/7527b2947

any help will be appreciated


#2

Hello Refael,
That can happen if you have gantt.config.xml_date:
http://snippet.dhtmlx.com/5/1e4569c3e
It is a deprecated parameter, but when specified, it takes a higher priority over the gantt.config.date_format parameter. It works that way for compatibility reasons, though, someday, it will be removed:
https://docs.dhtmlx.com/gantt/api__gantt_xml_date_config.html


#3

Thanks for the response Ramil, but I dont have xml_date configured anywhere, and anywhere in the project for that matter. The date is still not formatted correctly in the data processor.


#4

Hello Refael,
Unfortunately, it is hard to suggest what else might be wrong.

If you cannot reproduce the issue in the snippet, you can send me a ready demo so that I can reproduce the issue locally.