CurrentView.start - null fullcalendar

I am using Primeng's scheduling component to display a calendar with scheduling features. But I keep getting the following error:

ORIGINAL EXCEPTION: TypeError: Cannot read property 'clone' of null ORIGINAL STACKTRACE: TypeError: Cannot read property 'clone' of null at _fetchEventSource (http://localhost:8100/build/js/fullcalendar.js:10703:16) at fetchEventSource (http://localhost:8100/build/js/fullcalendar.js:10635:3) at fetchEvents (http://localhost:8100/build/js/fullcalendar.js:10629:4) at fetchAndRenderEvents (http://localhost:8100/build/js/fullcalendar.js:9789:3) at getAndRenderEvents (http://localhost:8100/build/js/fullcalendar.js:9780:4) at renderView (http://localhost:8100/build/js/fullcalendar.js:9671:6) at initialRender (http://localhost:8100/build/js/fullcalendar.js:9588:3) at Calendar_constructor.render (http://localhost:8100/build/js/fullcalendar.js:9552:4) at HTMLDivElement.<anonymous> (http://localhost:8100/build/js/fullcalendar.js:53:13) at Function.each (http://localhost:8100/build/js/jquery.min.js:2:2813) 

During further debugging, I found that currentView.start is null, and the same parameter is set to rangeStart , which is the property that causes the clone in fetchEventSource . I use the defaultview month. I'm out of ideas. Please help me here. PS I am trying to do this in angular 2. I am using fullCalendar version 2.7.3 . The jquery version is 3.0.0 and the moment.js version is 2.13.1.

Below is the error code. This is part of fullCalendar.js .

 function _fetchEventSource(source, callback) { var i; var fetchers = FC.sourceFetchers; var res; for (i=0; i<fetchers.length; i++) { res = fetchers[i].call( t, // this, the Calendar object source, rangeStart.clone(), rangeEnd.clone(), options.timezone, callback ); if (res === true) { // the fetcher is in charge. made its own async request return; } else if (typeof res == 'object') { // the fetcher returned a new source. process it _fetchEventSource(res, callback); return; } } ..... 
+5
source share
2 answers

I just ran into this problem while I was trying to enable angular -ui / fullcalender . The latest version (1.0.2) of this module depends on jQuery 2.x and does not work with jQuery 3.x. The first fullcalender version that works with jQuery 3 is v2.8.0, according to this .

I decided to go back to jQuery 2.1.4, but if you need it, you can use the current leading branch. It uses fullcalender in version 2.9.x.

Hope this helps!

0
source

If the start date and end date are the same, FullCalendar simply makes the end date a null value. When cloning an end date, check to see if it is null; if so, use a start date instead.

Check out the following link. Yes, this is a long-standing problem.

https://code.google.com/p/fullcalendar/issues/detail?id=1014

0
source

All Articles