Cannot read property '0' of null "timeline mode"


I am creating multiple scheduler on one page and facing issue while changing mode to “Timeline”.
It throws error like " Cannot read property ‘0’ of null". in dhtmlxscheduler.js file.

specifically it comes at the point when “this._els.dhx_multi_day is null”.

I have created instance like below:

scheduler1 = Scheduler.getSchedulerInstance();
scheduler1 .config…

scheduler2 = Scheduler.getSchedulerInstance();
scheduler2 .config…

I am facing this issue while working with Timeline mode only, for other modes like unit,week,day,month,year,agenda etc… it works fine

Can you please help me out with this.

  • Niki

Maybe the instance of the scheduler you trying to switch to the timeline does not have the timeline view. Please check the code, maybe you’ve called ‘createTimelineView’ from the wrong instance