我使用 fullcalendar 来显示事件,但我有问题。如何在dayGridWeek的左侧显示时间?
代码js:
var displayDisponibiltyBabySitter = function(){
var calendarEl = document.getElementById('disponiblity');
if(calendarEl){
var calendar = new FullCalendar.Calendar(calendarEl, {
defaultView: 'dayGridWeek' ,
validRange: function(nowDate){
return {start: nowDate}
},
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridWeek,timeGridDay'
},
locale: _mpop.current_lang,
timeZone: 'Europe/Paris',
eventBackgroundColor : "#444",
eventTextColor: '#EEE',
slotDuration: '00:60:00',
slotLabelFormat: [
{
hour: '2-digit',
minute: '2-digit',
hour12: false
}
],
views: {
dayGridWeek: {
eventTimeFormat: {
hour: 'numeric',
minute: '2-digit',
omitZeroMinute: true,
meridiem: 'narrow'
}
}
},
events: Routing.generate('front.babysitter.disponibilities',{'id': $("#dispo-babysitter").data("id")}),
plugins: [ 'dayGrid', 'timeGrid', 'list' ]
});
calendar.render();
}
};
提前致谢
但如何得到这个结果: