我正在尝试显示特定日期范围内的FullCalendar。为此,我在代码中添加了以下visibleRange
选项,但它不起作用。日历根本无法显示。
this.$calendar.fullCalendar({
//other settings
defaultView: 'basic',
visibleRange: {
start: moment('2017-05-22'),
end: moment('2017-05-29')
},
duration: { days: 7 },
//other settings
});
知道我如何实现这一目标吗?
谢谢
使用 momentjs 2.18.1、jquery 3.2.1、fullcalendar 3.4.0 这显示了从 5/22 到 5/28 的视图:
$('#calendar').fullCalendar({
defaultView: 'basic',
visibleRange: {
start: moment('2017-05-22'),
end: moment('2017-05-29')
} // Don't use duration in combination with visibleRange? Appears to override
/*,
duration: {
days: 7
}*/
});
演示 @ https://jsfiddle.net/ez33y8gv/