Handle large duration tasks
This commit is contained in:
parent
be45a9656f
commit
1926ddbd48
@ -98,6 +98,11 @@ export default function Gantt(element, tasks, config) {
|
||||
task._start = moment(task.start, self.config.date_format);
|
||||
task._end = moment(task.end, self.config.date_format);
|
||||
|
||||
// make task invalid if duration too large
|
||||
if(task._end.diff(task._start, 'years') > 10) {
|
||||
task.end = null;
|
||||
}
|
||||
|
||||
// cache index
|
||||
task._index = i;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user