我想在完整日历的每个单元格上显示一个文本,但默认情况下我总是得到那个长条。谁能知道该怎么做?
$(document).ready(function(){
var calendarEl = document.getElementById('calendarOutput');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid', 'timeGrid' ],
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth'
},
displayEventTime:false,
navLinks: true, // can click day/week names to navigate views
selectable: true,
eventLimit: true, // allow "more" link when too many events
eventSources:[
{
url:'http://localhost/servrevo_web/booking/getDate',
allDayDefault: 'true',
color: '#02a3bd',
textColor: 'black'
},
{
url:'http://localhost/servrevo_web/booking/getBooking',
color: '#87a900',
textColor: 'black'
}
]
});
opts.dayRender= function(date, cell) {
cell.append('<i class="fc-content" aria-hidden="true">Hello</i>');
}
$('#calendarEl').fullCalendar(opts);
});