【发布时间】:2019-02-22 17:53:23
【问题描述】:
您好,我的职责很简单。修改一个日历,我已经查看了两周前的“议程”视图,下一个/上一个应该只是向前/向后移动一天。
看起来很简单,检查了文档 - 似乎已经添加了新功能。 我使用 nuget 将日历升级到 3.9 并插入了自定义视图。 但无论我尝试什么都无法回头。试过 3.3.1 一样。
我做错了什么——或者我做错了什么?这是一个完整的日历错误吗?
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'agendaTwoWeeks,agendaWeek,agendaDay,listWeek,listDay'
},
weekends: false,
minTime: '08:00:00',
maxTime : '17:00:00',
buttonText: {
listWeek: 'Weekly',
listDay: 'Daily',
},
views: {
agendaTwoWeeks: {
type: 'agenda',
dayCount: 14
/*visibleRange: function(currentDate) {
console.log("current date "+currentDate.format());
var ret = {
start: currentDate.clone().subtract(1, 'days'),
end: currentDate.clone().add(3, 'days') // exclusive end, so 3
};
console.log(ret.start.format());
console.log(ret.end.format());
return ret;
}*/
},
agendaWeek: { // name of view
titleFormat: 'D MMM YYYY',
columnFormat: 'ddd D/M'
// other view-specific options here
},
agendaDay: { // name of view
titleFormat: 'D MMM YYYY',
columnFormat: 'dddd'
// other view-specific options here
},
listWeek: { // name of view
titleFormat: 'D MMM YYYY',
columnFormat: 'ddd D/M'
// other view-specific options here
},
listDay: { // name of view
titleFormat: 'D MMM YYYY',
columnFormat: 'ddd D/M'
// other view-specific options here
},
},
defaultDate: '2018-09-21',
/*validRange: {
start:'2017-09-18',
end: '2019-09-18'
},*/
firstDay : 1,
defaultView: 'agendaWeek',
editable: true,
eventDurationEditable: false,
allDaySlot: false,
eventTextColor: '#000000',
slotDuration: '00:15:00',
slotLabelInterval : '00:15:00',
});
});
视图是 agendaTwoWeeks 我玩过 daycount,duration, visibleRange , validRange - 似乎没有任何效果。
【问题讨论】:
标签: jquery date twitter-bootstrap-3 fullcalendar