即时重新绘制fullCalendar [英] re-draw fullCalendar on the fly

查看:229
本文介绍了即时重新绘制fullCalendar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


$ b

场景:
我正在使用支持资源视图的fullCalendar补丁。对于一些用户操作,我想更改资源。但我不想重新加载页面。

解决方案

您可以将日历作为整体销毁并渲染 。但这可能很麻烦 - 尤其是在旧版浏览器中。

  $('#calendar')。fullCalendar('destroy'); 
$('#calendar')。fullCalendar('render');

如果您实际上不需要渲染表格,但只需重新渲染事件,就可以使用'rerenderEvents'方法:

  $('#calendar')。fullCalendar('rerenderEvents'); 

希望这有助于您!


I want the fullCalendar to redraw itself (all the structure and events) without reloading the page.

Scenario: I am using a patch of fullCalendar that supports the Resource View. For a few user actions I want to change the resources. But I don't want to reload the page.

解决方案

You could 'destroy' and 'render' the calendar as a whole. But that might be cumbersome - especially in older browsers.

$('#calendar').fullCalendar('destroy');
$('#calendar').fullCalendar('render');

If you don't actually need to render the table, but just rerender the events again, you could use the 'rerenderEvents' method:

$('#calendar').fullCalendar('rerenderEvents');

Hopefully this helps!

这篇关于即时重新绘制fullCalendar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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