user476369
user476369

Reputation: 1

How to disable jQuery Fullcalendar plugin window resizing?

I'm using the FullCalendar plugin and it's working very well. I would like to disable the dynamic resizing of the table and its cells when the browser window is resized. Is that a possibility?

(I noticed in the documentation the 'windowResize' callback fires after the calendar is already resized, so it looks like that won't help.)

Upvotes: 0

Views: 1443

Answers (2)

Gus
Gus

Reputation: 7349

You can do this with CSS - just fix the width of the div that you are building the calendar in and the calendar will no longer resize with the window. The height, by default, is controlled by the aspectRatio setting of 1.35.

<script type="text/javascript">
var calendar = $('#calendar').fullCalendar({
// Cut: rest of javascript...
</script>
<style type="text/css">
    #calendar {
        width: 900px ;
    }
</style>
<div id="calendar"></div>

Upvotes: 0

Lorenzo
Lorenzo

Reputation: 29427

To which view are you referring? Please have a look at the weekMode property to fix the month and week view to a predefined size.

Also the property height and contentHeight can help you to freeze dimensions.

Upvotes: 1

Related Questions