Hi,
Is the Gantt able to show data fields, which has null value, but field type is date?
export let projectNewData = [ { TaskID: 1, TaskName: 'Product concept', StartDate: new Date('04/02/2019'), EndDate: new Date('04/21/2019') }, { TaskID: 2, TaskName: 'Product design', StartDate: null, EndDate: null }
Setting the above as GanttComponent dataSource, the GanttComponent does not seem to be able to render blank for Task 2 dates. Can you please advise how to configure so that StartDate and EndDate display as blank, for Task 2?
Thanks
Any options or workarounds?
Hi Devy,
Greetings from Syncfusion.
We have displayed the StartDate and EndDate as blank (with null values as well as empty string) as per your code example for both Grid and Gantt Chart components, but we are unable to replicate any issue at our end (It displays only blank values).
Code-Snippet:
let editingData = [ { TaskID: 1, TaskName: 'Product concept', StartDate: new Date('04/02/2019'), EndDate: new Date('04/21/2019'), }, { TaskID: 2, TaskName: 'Product design', StartDate: '', EndDate: '' }, ]; |
We need some more additional information about the issue. kindly share us the asked details below.
Sample - Ckpszw (forked) - StackBlitz
Regards,
Sridharan
Thanks Sridharan - we had also found the missing property that needed to be set, which was "
allowUnscheduledTasks"
Devy,
For your query, if the option "allowUnscheduledTasks" is set to true, null fields are allowed in the start and end date cells. Otherwise, the Gantt chart will automatically calculate the dates based on other parameters. Therefore, we recommend setting "allowUnscheduledTasks" to true to render the start and end date cells empty when needed.
Sample - Ckpszw (forked) - StackBlitz
Demo - Gantt Chart · Unscheduled Tasks · Syncfusion React UI Components
Documentation - Task scheduling in React Gantt component | Syncfusion
If we misunderstood your query share us more details.
Regards,
Sridharan