I'm trying to use fullcalendar and it keeps throwing this error. I have all the required files included which are:
fullcalendar.js
fullcalendar.css
moment.js
However I'm getting this following error:
Uncaught TypeError: Cannot read property 'localeData' of undefined
at getMomentLocaleData (fullcalendar.js:2554)
at locale (fullcalendar.js:2445)
at Object.defineProperty.value (fullcalendar.js:2559)
at __webpack_require__ (fullcalendar.js:30)
at Object.defineProperty.value (fullcalendar.js:12499)
at __webpack_require__ (fullcalendar.js:30)
at Object.defineProperty.value (fullcalendar.js:7367)
at __webpack_require__ (fullcalendar.js:30)
at Object.defineProperty.value (fullcalendar.js:12109)
at __webpack_require__ (fullcalendar.js:30)
Here is my initialization of fullcalendar:
window.onload = function () {
$('#calendar').fullCalendar({
handleWindowResize: true,
defaultView: 'month',
themeSystem: "bootstrap3",
eventLimit: true,
//navLinks: true, // enable clicking on different days
week: true,
day: true,
agenda: true,
basic: true,
events: [
{
title: 'event1',
start: '2017-11-01'
},
{
title: 'Holiday',
start: '2017-11-05',
end: '2017-11-07'
},
{
title: 'event3',
start: '2017-11-09T12:30:00',
allDay: false // will make the time show
}
]
})
$(".fc-today-button").html('<i class="fa fa-calendar"></i>');
$(".fc-prev-button").html('<i class="fa fa-arrow-left"></i>');
$(".fc-next-button").html('<i class="fa fa-arrow-right"></i>');
}
The calendar displays fine but because of this error, any jQuery that needs to be ran after is not running because of this exception.
Any pointers?