简体   繁体   English

如何阻止 fullcalendar 在周视图中渲染一整天?

[英]How to stop fullcalendar from rendering a full day in week view?

First off I am reading the documentation and I have used minTime and MaxTime to render specific slots.首先,我正在阅读文档,并使用 minTime 和 MaxTime 来呈现特定插槽。

The problem I have is that the entire day get's rendered and I assume that this can be overridden but I have not been able to find the option that does this if it exists?我遇到的问题是一整天都被渲染,我认为这可以被覆盖,但我无法找到执行此操作的选项(如果存在)?

I want to render a fullcalendar between 09:00 and 19:00.我想在 09:00 到 19:00 之间渲染一个完整的日历。 My code so far:到目前为止我的代码:

$(document).ready(function () {

    $('#calendar').fullCalendar({
        defaultView: 'agendaWeek',
        minTime: '09:00:00',
        maxTime: '19:00:00',
        allDaySlot: false
})

My problem:我的问题: 问题图片

This can be done with CSS and setting the overflow property of the calendar.这可以通过 CSS 并设置日历的overflow属性来完成。

However, you should also read the documentation on fullcalendar's height property.但是,您还应该阅读有关 fullcalendar height属性的文档。

Quoting the documentation:引用文档:

By default, [the height] option is unset and the calendar's height is calculated by aspectRatio.默认情况下, [the height] 选项未设置,日历的高度由 aspectRatio 计算。

You also have the ability to change aspectRatio to whatever you would like.您还可以将宽高比更改为您想要的任何值。 You can read up on that here: http://fullcalendar.io/docs/display/aspectRatio/你可以在这里阅读: http : //fullcalendar.io/docs/display/aspectRatio/

Height has the input options of:高度有以下输入选项:

Integer, "auto"

With proper usage as:正确使用为:

$('#calendar').fullCalendar({
    height: 650 //[integer, "auto"]
});

The documentation for height can be found here: http://fullcalendar.io/docs/display/height/可以在此处找到高度文档: http : //fullcalendar.io/docs/display/height/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM