完整日历 columnFormat 导致 object object
Full Calendar columnFormat leads to object object
我正在尝试更改 agendaWeek 中的列标题以仅显示日期,例如星期一,而不是 5 月 7 日星期一。但是,当我尝试进行任何更改时,列标题变为 object object.Here's a screenshot.
我使用的是 FullCalendar 3.4.0 版和 jquery 2.1.1。
这是我的代码片段:
$(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
尝试像这样在视图议程下设置 slotLabelFormat
views: {
agenda: {
slotLabelFormat: 'ddd',
}
}
我正在尝试更改 agendaWeek 中的列标题以仅显示日期,例如星期一,而不是 5 月 7 日星期一。但是,当我尝试进行任何更改时,列标题变为 object object.Here's a screenshot.
我使用的是 FullCalendar 3.4.0 版和 jquery 2.1.1。 这是我的代码片段:
$(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
尝试像这样在视图议程下设置 slotLabelFormat
views: {
agenda: {
slotLabelFormat: 'ddd',
}
}