search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Switcher bug

Asked by Giovanni
4 years ago.

I get the following error when I switch from Monthly View to Event View:
Uncaught TypeError: Cannot read property 'lines' of undefined
DayPilot.Calendar.$4T @ daypilot.js:14
DayPilot.Calendar.$75 @ daypilot.js:14
DayPilot.Calendar.update @ daypilot.js:14
DayPilot.Switcher.addView.$2o.sendNavigate @ daypilot.js:8
navigate @ daypilot.js:8
DayPilot.Switcher.addNavigator.$2m.onTimeRangeSelected @ daypilot.js:8
$0C @ daypilot.js:29select @ daypilot.js:29
DayPilot.Switcher.navigator.updateMode @ daypilot.js:8 @ daypilot.js:8
DayPilot.Switcher.addTrigger.$2q.onClick @ daypilot.js:8

It happens only after a fresh start.
The default view is Scheduler, I switch to the Monthly and then to the Event Calendar and the error shows up.

Any idea of the possible cause?


Comment posted by Dan Letecky [DayPilot]
4 years ago.

Hi Giovanni,

What version of DayPilot do you use? Does it happen with the latest version as well (8.1.1821)?

There is also a tutorial on using the Switcher that may help:

Or are you able reproduce the error with the tutorial code?

Comment posted by Giovanni
4 years ago.

In version 8.1.1821 this problem is present.

I've solved it adding this code at line 14636 in daypilot-all.debug.js:
else { = [];

Answer posted by Dan Letecky [DayPilot]
4 years ago.

Thanks, it should be fixed now in the latest sandbox build (8.1.1842):

Comment posted by Giovanni
4 years ago.

I've updated to latest versione and it works!

Thank you :)

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.