我试图更改“AgendaWeek”中的列标题,仅显示当天,例如Mon,而不是Mon 5/7。但是,当我尝试进行任何更改时,列标题将成为对象对象。Here's a screenshot.
我正在使用FullCalendar和jquery 2.1.1的3.4.0版本。 这是我的代码片段:
$(document).ready(function() {
$('#calendar').fullCalendar({
header: false,
defaultView: "agendaWeek",
defaultDate: '2017-05-12',
views: {
agenda: {
columnFormat: {
month: 'dddd', // Monday, Wednesday, etc
week: 'dddd, MMM dS', // Monday 9/7
day: 'dddd, MMM dS' // Monday 9/7
}
// options apply to agendaWeek and agendaDay views
}
},
navLinks: true, // can click day/week names to navigate views
selectable: true,
selectHelper: true,
select: function(start, end) {
var title = prompt('Event Title:');
var eventData;
if (title) {
eventData = {
title: title,
start: start,
end: end
};
$('#calendar').fullCalendar('renderEvent', eventData, true); // stick? = true
}
$('#calendar').fullCalendar('unselect');
},
editable: true,
eventLimit: true, // allow "more" link when too many events
答案 0 :(得分:1)
尝试在此视图议程下设置slotLabelFormat
views: {
agenda: {
slotLabelFormat: 'ddd',
}
}