jQuery FullCalendar - 我可以以编程方式调整日历的大小 [英] jQuery FullCalendar - Can I programmatically resize the Calendar
问题描述
我使用FullCalendar,并且我意识到如果窗口大小已调整,FullCalendar的
在初始化时:
$('#calendar')。fullCalendar({
aspectRatio: 2
});
初始化后:
$('#calendar')。fullCalendar('option','aspectRatio',1.8);
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).
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!
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);
这篇关于jQuery FullCalendar - 我可以以编程方式调整日历的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!