简体   繁体   中英

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.

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. 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.

However, you should also read the documentation on fullcalendar's height property.

Quoting the documentation:

By default, [the height] option is unset and the calendar's height is calculated by 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/

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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