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

Switcher bug

Asked by Giovanni
8 years ago.

Hi,
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.Switcher.show @ 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?

Thanks,
Giovanni

Comment posted by Dan Letecky [DayPilot]
8 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:
http://code.daypilot.org/27988/html5-calendar-with-day-week-month-views-javascript-php

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

Comment posted by Giovanni
8 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 {
this.events.list = [];
this._loadEvents();
}

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

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

http://javascript.daypilot.org/sandbox/

Comment posted by Giovanni
8 years ago.

I've updated to latest versione and it works!

Thank you :)

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