如何在不刷新页面的情况下更改eventLimit以显示不同eventLimit的效果 [英] How can change eventLimit without refreshing the page in order to show the effect of different eventLimit

查看:151
本文介绍了如何在不刷新页面的情况下更改eventLimit以显示不同eventLimit的效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过点击按钮来显示具有不同参数的日历视图 eventLimit ,因为页面上有许多事件是用户添加或修改的,但不保存到服务器。用户需要切换到这个jsfiddle 的事件限制的不同视图

解决方案

要在日历已经呈现时更改选项,您需要首先销毁日历,然后更改选项,然后重新生成日历。
您可以这样做:

  var options = $('。calendar')。fullCalendar('getView )可供选项; 
options.eventLimit = false;
$('。calendar')。fullCalendar('destroy');
$('。calendar')。fullCalendar(options);



jsfiddle


I think by clicking on the button to display the calendar view eventLimit with different parameters, because there are a number of events on the page is a user added or modified, but not saved to the server. Users need to switch to a different view of events limit, which is in this jsfiddle

解决方案

To change options when the calendar is already rendered you need to destroy the calendar first, change the option, then build the calendar again. You can do it like this:

var options = $('.calendar').fullCalendar('getView').options;
options.eventLimit = false;
$('.calendar').fullCalendar('destroy');
$('.calendar').fullCalendar(options);

jsfiddle

这篇关于如何在不刷新页面的情况下更改eventLimit以显示不同eventLimit的效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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