Invalid date

Hello,

I am using the new feature for Gantt control- unscheduled-tasks. I have all dates (baseline start, baseline end, actual start, actual end) equal to null. For a parent task, the actual start is equal to the scheduleStartDate and the actual end is equal to scheduleStartDate plus duration. Is it possible to not show this dates if the date is equal to null?Additionally, I don't why "Invalid date" shows in other cells.

Best regards,
Tomasz Tomczykiewicz

5 Replies

JR John Rajaram Syncfusion Team October 12, 2018 11:11 AM UTC

Hi Tomasz, 
Thank you for contacting Syncfusion support. 
Please find the below updates. 
Query1: I have all dates (baseline start, baseline end, actual start, actual end) equal to null. For a parent task, the actual start is equal to the scheduleStartDate and the actual end is equal to scheduleStartDate plus duration.  
Answer: In Gantt the parent taskbar is rendered based on the lowest startDate of the child items and the highest endDate of the child items. In unscheduled task support, if the startDate and endDate value of the child records are null, then the child records taskbars will not be rendered in Gantt chart side and hence the parent taskbar also didn’t render on the Gantt chart side even the parent task has startDate and endDate values.  
We have prepared the sample for your reference, please find the sample link below 
Query2: Is it possible to not show this dates if the date is equal to null?Additionally, I don't why "Invalid date" shows in other cells. 
Answer: Can you please provide more details about this query, it will be very helpful to provide the exact solution. 
Regards, 
John R 



TT Tomasz Tomczykiewicz October 12, 2018 03:12 PM UTC

Hi,

I fixed the problem with invalid date.
For the first problem, I attached the screenshot. I hope it will help. I have all dates set to null, but I don't know why in the Gantt chart two dates are displayed.

Best regards,
Tomasz Tomczykiewicz

Attachment: gantt_a8560d30.zip


JR John Rajaram Syncfusion Team October 15, 2018 07:26 AM UTC

Hi Tomasz,  
The reported scenario in screenshot will occur in Gantt, when the duration value is mapped in your Gantt control with durationMapping property. As we said earlier, in Gantt unscheduled task support, the taskbar of the child task will not rendered in Gantt chart side, when child task don’t have startDate and endDate value. But if the child task has the duration value then the child taskbar will render on the Gantt chart side based on the duration value (Internally its start date will be calculated from Schedule start date). Hence the parent taskbar also rendered on the Gantt chat side with start and end dates in Grid column. Please refer the below code snippets.  
<script type="text/javascript"> 
        var unscheduledData = [ 
    { 
        taskID: 1, 
        taskName: "Project Schedule", 
        startDate: null, 
        endDate: null, 
        taskColor: "#F2A4A7", 
        progressColor: "#DE605C", 
        subtasks: [ 
            { 
                taskID: 2, 
                taskName: "Planning", 
                startDate: null, 
                endDate: null, 
                taskColor: "#79BDC9", 
                progressColor: "#59AAB4", 
            }, 
                
                    { taskID: 3, taskName: "Plan timeline", startDate: null, endDate: null, BaselineStartDate: null, BaselineEndDate: null, progress: "60", resourceId: [1] }, 
                    { taskID: 4, taskName: "Plan budget", startDate: null, endDate: null, duration: 1, progress: "90", BaselineStartDate: null, BaselineEndDate: null, resourceId: [5] }, 
                    { taskID: 5, taskName: "Allocate resources", startDate: null, endDate: null, duration: 1, progress: "75", resourceId: [6] }, 
                    { taskID: 6, taskName: "Planning complete", startDate: null, endDate: null, duration: null, predecessor: "3FS,5FS", resourceId: [1] } 
        ] 
    } 
    ]; 
        $(function () { 
                     $("#GanttContainer").ejGantt({ 
                              dataSource: unscheduledData, 
                            durationMapping: "duration", 
                             //.. 
           }); 
        }); 
    </script> 
So, we request you to ensure whether you have mapped the duration value in your application. If you do not need this support, you can remove the duration mapping property.  
You can check the below sample for further references. 
Please get back to us if you need further assistance on this. 
Regards, 
John R 



TT Tomasz Tomczykiewicz October 15, 2018 09:57 AM UTC

Hi John,

I set the duration to null and it solved my problem. Thanks for help.

Best regards,
Tomasz Tomczykiewicz


JR John Rajaram Syncfusion Team October 15, 2018 12:26 PM UTC

Hi Tomasz, 
Thank you for the update. Please let us know if you require any other assistance. 
Regards, 
John R 


Loader.
Up arrow icon