getFullYear problem

I downloaded the pro gantt control and am trying to do a proof of concept. If I add using the very top plus button on the gantt, everything is fine. If I use a plus button in the middle of the schedule, I get an error in javascript “date.getFullYear is not a function”. What am I doing wrong?

Hello Jon,
It should be related to Gantt configuration.
One of the reasons why it happens is that the xml_date template returns wrong data. It should return a date object, but it returns the string:
To fix it, you need to return a date object or a command that will convert a string to a date object:

return new Date(date)


return"%d-%m-%Y %H:%i")(date);

Here is the updated snippet:

However, it might happen because of other reasons. I don’t see your code, so I cannot tell you what is the cause.

Please, reproduce the issue in the snippet, then click on the “Share” button and send me the link:
Or send me an HTML file with all the necessary Javascript and CSS files.