gpt4 book ai didi

javascript - FullCalendar-2.7.3 事件在初始加载时不显示

转载 作者:行者123 更新时间:2023-11-28 18:31:55 25 4
gpt4 key购买 nike

在我的控制台中,我收到此错误:

jQuery.Deferred exception: Cannot read property 'clone' of null TypeError: Cannot read property 'clone' of null

在 _fetchEventSource(source,callback) 方法的循环中:

for (i = 0; i < fetchers.length; i++) {
res = fetchers[i].call(
t, // this, the Calendar object
source,
rangeStart.clone(), // rangeStart is undefined
rangeEnd.clone(),
options.timezone,
callback
);

问题是未设置 rangeStart。但是,如果我使用默认标题中的按钮从“月” View 更改为“周” View ,然后再次返回,则会加载事件。

我不明白为什么 rangeStart 最初没有被设置,但如果我切换 View ,它就设置得很好。

 

为了完整起见,这是我调用日历的 JS:

$('.event-calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},
eventLimit: true,
events: {
url: '/events/json',
color: '#0060db',
textColor: 'white'
}
});

最佳答案

这是与最新 JQuery 3 兼容的问题。我无能为力,但如果您想使用 FullCallendar,您应该暂时将 JQuery 反转到 2.x 或 1.x 行并等待 FullCalendar 更新。

关于javascript - FullCalendar-2.7.3 事件在初始加载时不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37821389/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com