I'm using a fullcalendar library in my lightning component but the calendar is not showing up. Component:Component:
<aura:component >
<ltng:require scripts="{!$Resource.jQuery}"/>
<ltng:require scripts="/resource/FullCalendar/lib/jquery.min,
/resource/FullCalendar/lib/moment.min,
/resource/FullCalendar/fullcalendar"/>
<div id="calendar">
<div onclick="{!c.comp}">test</div>
</div>
</aura:component>
Controller:Controller:
({
comp : function(component, event, helper) {
$(document).ready(function() {
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay,listWeek'
},
defaultDate: '2017-02-12',
editable: true,
navLinks: true, // can click day/week names to navigate views
eventLimit: true, // allow "more" link when too many events
events: {
url: 'php/get-events.php',
error: function() {
$('#script-warning').show();
}
},
loading: function(bool) {
$('#loading').toggle(bool);
}
});
});
}
})
})
On click of test I want to show the calendar. But I'm getting this error $(...).fullCalendar is not a function TypeError