Gantt parseDate method

Hi,
We are using trial version of gantt.
Here in below code we are getting error- parseDate does not exists on type ‘GanttDateHelpers’.

gantt.attachEvent(“onTaskLoading”, function (task) {

            task.plannedStartDate = gantt.date.parseDate(task.plannedStartDate, "xml_date");
            task.plannedEndDate = gantt.date.parseDate(task.plannedEndDate, "xml_date");
    
            return true;
        });

Please suggest your solution.

Regards,
Sweeti

Hello Sweeti,
If I paste your code in the snippet I get the error:
http://snippet.dhtmlx.com/76f8063ef

But if I fix the quotes: “onTaskLoading” to 'onTaskLoading' everything starts working:
http://snippet.dhtmlx.com/e33f516a8
I also tried to reproduce it in a local sample with the trial version and I don’t get the error with the fixed quotes.

If that doesn’t help you, please reproduce the issue in the snippet, click on the “Share” button and copy the link. Or send me your HTML page with all necessary Javascript code so that I can reproduce it locally.

Hello Sweeti,
I checked your post in another topic and looks like it explains why you get the error. Please refer to the following link:

Hi Ramil,

Issue is fixed , thanks for your response.
But layer is not drag-gable. Please suggest how we can make it drag-gable.

Thanks & Regards,
Sweeti

Hello Sweeti,
The layers are not draggable by default. You need to add that feature manually (except for the split tasks). Here is an example how it might be implemented:
http://snippet.dhtmlx.com/a6f4651b3

Hi Ramil,

I want to reduce or extend the time scale (planned start date and planned end date) for added layer. so, that we can increase or decrease the planned end date and planned start date for respective task. as we do with original bar.

Thanks & Regards,
Sweeti

Hello Sweeti,
You can try changing it from the lightbox. Here is an example:
https://snippet.dhtmlx.com/7f14fd282

I do not have an example that will allow resizing and moving (and more important saving) planned bars. You need to implement your own solution.