So I have two questions I’d like to post here.
First, whenever I specify gantt.config.start_date and gantt.config.end_date the chart fails to render with the following error message:
Uncaught TypeError: Cannot call method 'valueOf' of undefined dhtmlxgantt.js:8
gantt.date.add dhtmlxgantt.js:8
gantt._scale_helpers.formatScales dhtmlxgantt.js:6
gantt._scale_helpers.prepareConfigs dhtmlxgantt.js:6
gantt._render_tasks_scales dhtmlxgantt.js:6
gantt.render dhtmlxgantt.js:8
gantt._reinit dhtmlxgantt.js:8
gantt.init dhtmlxgantt.js:8
(anonymous function) modalGanttProjectTasks.aspx?Project=X-HEDC.000.000&IsDlg=1:91
o jquery-1.7.2.min.js:2
p.fireWith jquery-1.7.2.min.js:2
e.extend.ready jquery-1.7.2.min.js:2
c.addEventListener.B
I’m passing both a valid JS date object, and when I write their values to the console they appear valid, but setting them causes the above error. This also happens when I use:
gantt.init("gantt_here", startDate, endDate)
…where both startDate and endDate are JS date objects. If I remove this initialization/option, the chart works as expected.
Second question:
When my chart has tasks whose duration is outside of the render view, adjustment of any task results in a scroll to event that leaves the render at the earliest date position.
Is there a method or configuration option to prevent this behavior? I assume I could write a custom event handler to maintain the current scroll position, but would rather avoid the extra code if possible.
Thank you.