Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fullcalendar cannot read property 'fn' of undefined

I embedded fullcalendar.min.js to my project, but I get this error:

error log show "Cannot read property 'fn' of undefined"

See picture below.

I checked this issue, it's suggested to use jQuery 2.0.0+, and for sure I use jQuery v3.3.1, but it does not help to solve problem.

enter image description here

like image 721
陳銘山 Avatar asked May 11 '18 09:05

陳銘山


2 Answers

That's because you have to load moment.js before fullcalendar.js!

like image 141
willes Avatar answered Oct 23 '22 17:10

willes


The documentation should include a reference to moment.js

https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js

then the fullcalendar.js references:

https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.css https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.print.css

like image 43
Ravi Ram Avatar answered Oct 23 '22 18:10

Ravi Ram