Angular currentView.start为空
我使用Primeng的日程组件来显示具有日程安排功能的日历。但我一直得到以下错误:Angular currentView.start为空,angular,fullcalendar,Angular,Fullcalendar,我使用Primeng的日程组件来显示具有日程安排功能的日历。但我一直得到以下错误: ORIGINAL EXCEPTION: TypeError: Cannot read property 'clone' of null ORIGINAL STACKTRACE: TypeError: Cannot read property 'clone' of null at _fetchEventSource (http://localhost:8100/build/js/fullcalendar.j
ORIGINAL EXCEPTION: TypeError: Cannot read property 'clone' of null
ORIGINAL STACKTRACE:
TypeError: Cannot read property 'clone' of null
at _fetchEventSource (http://localhost:8100/build/js/fullcalendar.js:10703:16)
at fetchEventSource (http://localhost:8100/build/js/fullcalendar.js:10635:3)
at fetchEvents (http://localhost:8100/build/js/fullcalendar.js:10629:4)
at fetchAndRenderEvents (http://localhost:8100/build/js/fullcalendar.js:9789:3)
at getAndRenderEvents (http://localhost:8100/build/js/fullcalendar.js:9780:4)
at renderView (http://localhost:8100/build/js/fullcalendar.js:9671:6)
at initialRender (http://localhost:8100/build/js/fullcalendar.js:9588:3)
at Calendar_constructor.render (http://localhost:8100/build/js/fullcalendar.js:9552:4)
at HTMLDivElement.<anonymous> (http://localhost:8100/build/js/fullcalendar.js:53:13)
at Function.each (http://localhost:8100/build/js/jquery.min.js:2:2813)
若开始日期和结束日期相同,FullCalendar只会将结束日期设为空值。克隆结束日期时,请检查值是否为空,如果为空,请改用开始日期 检查以下链接。是的,这是一个老问题
我在尝试包含时遇到了这个问题。该模块的最新版本(1.0.2)依赖于jQuery2.x,并且不使用jQuery3.x。据介绍,与jQuery 3配合使用的FullCalendar的第一个版本是v2.8.0 我决定回到jQuery 2.1.4,但如果需要,可以使用 当前主分支。它在版本2.9.x中使用FullCalendar
希望这有帮助 什么代码会产生这个错误?@GünterZöchbauer请查看编辑。谢谢。您是否检查了
rangeStart
或rangeEnd
是否为!=当对它们调用.clone()
时为null
?@GünterZöchbauer是的,我已经检查过了。它们都是空的。它们从currentView.start和currentView.end获取值,这两个值都为null。这些值是在instatiateView期间为viewType设置的。当我检查currentView值时,开始和结束字段丢失,因此null被传递给rangeStart和RangeEnd。我想我在这里无能为力。我不知道。
function _fetchEventSource(source, callback) {
var i;
var fetchers = FC.sourceFetchers;
var res;
for (i=0; i<fetchers.length; i++) {
res = fetchers[i].call(
t, // this, the Calendar object
source,
rangeStart.clone(),
rangeEnd.clone(),
options.timezone,
callback
);
if (res === true) {
// the fetcher is in charge. made its own async request
return;
}
else if (typeof res == 'object') {
// the fetcher returned a new source. process it
_fetchEventSource(res, callback);
return;
}
}
.....