[REACT] About the inconsistency between the time of the data and the time on the Gantt chart
The timing of the tasks data is like this
But the rendered time looks like this
why?
The timing of the tasks data is like this
But the rendered time looks like this
why?
Try with endDate set to same format as startDate:
endDate : '2019-02-09'
{
id: 999,
name: 'Launch SaaS Product',
percentDone: 50,
startDate: '2019-01-24',
expanded: true,
children: [
{
id: 111111111,
name: 'Setup web server',
percentDone: 50,
duration: 10,
startDate: '2019-01-28',
rollup: false,
endDate: '2019-02-09',
expanded: true,
},
{
id: 22222,
name: 'Setup web server2222',
percentDone: 50,
duration: 10,
startDate: '2019-02-28',
rollup: true,
endDate: '2019-03-09',
expanded: true,
},
{
id: 333333,
name: 'Setup web server3333',
percentDone: 50,
duration: 10,
startDate: '2019-04-28',
rollup: true,
endDate: '2019-05-09',
expanded: true,
},
],
},
It's not a date format problem, using this code for Gantt chart rendering, the display effect is the effect of this image.
Setup web server3333 The time of this task is obviously different from the time in the code.
What if you add
manuallyScheduled: true
to the data block of Setup web server3333?
It is ok.
I added the code
manuallyScheduled: true
Still having problems using manual scheduling, that's completely manual between tasks, which isn't what I want either. I just want the tasks not to be automatically scheduled to the start time of the parent task.
An automatically scheduled task position is calculated ..even though you provide its start/end dates they are revalidated.
If manual task is not what you want try using constraints:
startDate : "2019-01-28",
constraintType : "startnoearlierthan",
constraintDate : "2019-01-28",
More info on task scheduling principles: https://www.bryntum.com/docs/gantt/guide/engine/gantt_events_scheduling (this chapter describes constraints effect)
Fields docs:
https://www.bryntum.com/docs/gantt/api/Gantt/model/TaskModel#field-constraintType
https://www.bryntum.com/docs/gantt/api/Gantt/model/TaskModel#field-constraintDate