我使用的是周视图,但是不是每张幻灯片显示7列我想显示三列,是否可以存档?
我在官方文档中没有看到任何相关方法:http://fullcalendar.io/docs/
答案 0 :(得分:1)
完整日历2.2.5+版本内置了这种自定义功能。
你只需要这样做:
views: {
agendaThreeDay: {
type: 'agenda',
duration: { days: 3 },
buttonText: '3 day'
},
defaultView: 'agendaThreeDay'
}
您可以从文档页面here获取有关此内容的更多信息。
答案 1 :(得分:0)
拉动源代码,使用此代码(可能需要进行一些额外的更改)。
<强>的src /议程/ AgendaThreeDayView.js 强>
fcViews.agendaThreeDay = AgendaThreeDayView;
function AgendaThreeDayView(a) {
AgendaView.call(this, a);
}
AgendaThreeDayView.prototype = createObject(AgendaView.prototype);
$.extend(AgendaThreeDayView.prototype, {
name: "agendaThreeDay",
incrementDate: function(a, b) {
return a.clone().stripTime().add(b, "days");
},
render: function(a) {
this.intervalStart = a.clone().stripTime();
this.intervalEnd = this.intervalStart.clone().add(3, "days");
this.start = this.skipHiddenDays(this.intervalStart);
this.end = this.skipHiddenDays(this.intervalEnd, -1, true);
this.title = this.calendar.formatRange(this.start, this.end.clone().subtract(1), this.opt("titleFormat"), " — ");
AgendaView.prototype.render.call(this, 3);
}
});
修改强>
记得您需要将文件添加到lumbar.json
在此处查看如何构建:https://github.com/arshaw/fullcalendar/wiki/Contributing-Code