对于新版本Full calendar version 5
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new Calendar(calendarEl, {
plugins: [ momentPlugin, dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin ],
initialView: 'dayGridMonth',
themeSystem: 'bootstrap',
height: 600,
selectable:true,
editable:true,
headerToolbar: {
left: 'today,prev,next',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
},
eventClick: function(info) {
var eventObj = info.event;
console.log(eventObj.extendedProps.description);
},
eventDidMount: function(info) {
$(info.el).tooltip({
title: info.event.title,
});
},
events: '/url',
eventColor: '#378006',
});
calendar.render();
});