在完全日历更改slotDuration没有页面重新加载 [英] In fullCalendar change slotDuration without page reloading
问题描述
使用fullcalendar我需要在不重新加载页面的情况下根据其他条件更改 slotDuration
参数:
一种情况
$('#calendar')。fullCalendar('option','slotDuration','00:15:00 );
以及其他情况
$('#calendar')。fullCalendar('option','slotDuration','00:30:00');
但看起来不起作用,因为我总是看到fullcalendar和 slotDuration = 30
(2个插槽)分钟,因为它是在初始化时调用的。
如果有这种方法吗?
现在,您可以设置动态
去掉日历
。
$('#cc -calendar')
.fullCalendar('option','slotDuration','00:10:00');
在这里,我们使用动态获取/设置选项
fullcalendar 。
有关更多信息,请查看: https://fullcalendar.io/docs/utilities/dynamic_options/
好运。
Using fullcalendar I need without page reloading to change slotDuration
parameter depending on other conditions:
I do in one case
$('#calendar').fullCalendar('option', 'slotDuration', '00:15:00');
and in other case
$('#calendar').fullCalendar('option', 'slotDuration', '00:30:00');
But looks like it does not work, as I always see fullcalendar with slotDuration=30
(2 slots) minutes, as it was called when initialized.
If there is a way for this?
Now, you can set dynamically
without destorying the calendar
.
$('#cc-calendar')
.fullCalendar('option','slotDuration','00:10:00');
Here, we work with the Dynamically get/set Options
feature of fullcalendar
.
For more info, check out : https://fullcalendar.io/docs/utilities/dynamic_options/
Good Luck.
这篇关于在完全日历更改slotDuration没有页面重新加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!