diff --git a/src/Gantt.js b/src/Gantt.js index 3ebc2d3..b1a3819 100644 --- a/src/Gantt.js +++ b/src/Gantt.js @@ -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;