首先,我正在阅读文档,并使用 minTime 和 MaxTime 来渲染特定的插槽。
我遇到的问题是,一整天都会被渲染,我认为这可以被覆盖,但我无法找到执行此操作的选项(如果存在)?
我想在 09:00 到 19:00 之间渲染全日历。到目前为止我的代码:
$(document).ready(function () {
$('#calendar').fullCalendar({
defaultView: 'agendaWeek',
minTime: '09:00:00',
maxTime: '19:00:00',
allDaySlot: false
})
最佳答案
这可以通过 CSS 并设置日历的 overflow
属性来完成。
但是,您还应该阅读有关 fullcalendar 的 height
属性的文档。
引用文档:
By default, [the height] option is unset and the calendar's height is calculated by aspectRatio.
您还可以将宽高比更改为您想要的任何值。您可以在这里阅读:http://fullcalendar.io/docs/display/aspectRatio/
高度的输入选项为:
Integer, "auto"
正确使用如下:
$('#calendar').fullCalendar({
height: 650 //[integer, "auto"]
});
可以在此处找到高度文档:http://fullcalendar.io/docs/display/height/
关于javascript - 如何阻止 fullcalendar 渲染周 View 中的一整天?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33020436/