Question

I'm using FullCalendar, and I realize that if the window is resized, FullCalendar's default is to handle the window resize and adjust the calendar as needed.

However, I have a slight problem when a nav sidebar is chosen to slide in/out, FullCalendar is left with some extra large weekend Saturdays. (See below). And the opposite is true when the Nav Sidebar slides back out. (The weekends become quite small).

Big Weekends!

The only remedy thus far has been to resize window, which then adjusts the calendar. But I don't want users to have to do this obviously.

Is there a way to programmatically resize/refresh the calendar size without resizing the window?

I have tried something like: $("#calendar").fullCalendar( 'windowResize' ); But this doesn't seem to work.

Any ideas on what I could do here?

Thanks!

Was it helpful?

Solution

Dodinas as requested, the following worked for you for dynamically resizing the calendar.

http://arshaw.com/fullcalendar/docs/display/aspectRatio/

On initialize:

$('#calendar').fullCalendar({
    aspectRatio: 2
});

After initialize:

$('#calendar').fullCalendar('option', 'aspectRatio', 1.8);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top