jQuery FullCalendar - 我可以以编程方式调整日历的大小 [英] jQuery FullCalendar - Can I programmatically resize the Calendar

查看:159
本文介绍了jQuery FullCalendar - 我可以以编程方式调整日历的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆