fullcalendar cannot read property 'fn' of undefined

房东的猫 提交于 2019-12-23 09:31:19

问题


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.


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/50289327/fullcalendar-cannot-read-property-fn-of-undefined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!