Hotel room booking Demo - getElementsByTagName is undefined

The solution with demo for Hotel room booking is working fine. However once I copied it to my solution to try it out, I got an error in console:

Uncaught TypeError: Cannot read property ‘getElementsByTagName’ of undefined
at Object.e._timeline_y_scale (dhtmlxscheduler_timeline.js:33)
at Object.e._timeline_set_full_view (dhtmlxscheduler_timeline.js:40)
at Object.e._renderMatrix (dhtmlxscheduler_timeline.js:44)
at Object.e.render_data (dhtmlxscheduler_timeline.js:11)
at Object.scheduler.render_view_data (dhtmlxscheduler.js:166)
at Object.scheduler.update_view (dhtmlxscheduler.js:103)
at Object.scheduler.updateView (dhtmlxscheduler.js:106)
at Object.scheduler.setCurrentView (dhtmlxscheduler.js:106)
at Object.scheduler.init (dhtmlxscheduler.js:70)
at Index:469
e._timeline_y_scale @ dhtmlxscheduler_timeline.js:33
e._timeline_set_full_view @ dhtmlxscheduler_timeline.js:40
e._renderMatrix @ dhtmlxscheduler_timeline.js:44
e.render_data @ dhtmlxscheduler_timeline.js:11
scheduler.render_view_data @ dhtmlxscheduler.js:166
scheduler.update_view @ dhtmlxscheduler.js:103
scheduler.updateView @ dhtmlxscheduler.js:106
scheduler.setCurrentView @ dhtmlxscheduler.js:106
scheduler.init @ dhtmlxscheduler.js:70
(anonymous) @ Index:469

Any ideas why is this happening?

Hi,
such error is a bit unusual. Can you send a project where it happens?