无法读取属性'选项'的未定义



我正在使用调度器的试用版。我已尝试在此说明之后插入自定义视图https://fullcalendar.io/docs/timeline-view

我得到一个错误

Uncaught TypeError: Cannot read property 'options' of undefined
at i._renderSkeleton (main.min.js:6)
at i.res [as renderSkeleton] (main.js:3189)
at i.render (main.min.js:6)
at i.Component.receiveProps (main.js:3887)
at CalendarComponent.renderView (main.js:6277)
at CalendarComponent.render (main.js:6202)
at CalendarComponent.Component.receiveProps (main.js:3887)
at Calendar.renderComponent (main.js:6817)
at Calendar.executeRender (main.js:6774)
at Calendar.tryRerender (main.js:6755)
at Calendar.requestRerender (main.js:6747)
at Calendar.dispatch (main.js:6735)
at Calendar.changeView (main.js:7006)
at HTMLButtonElement.buttonClick (main.js:6063)

这是我代码的一部分:

var calendar = new FullCalendar.Calendar(calendarEl, {
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
plugins: ['interaction', 'dayGrid', 'timeGrid', 'list', 'resourceTimeline'],
defaultView: 'dayGridMonth',
defaultDate: currentDate,
editable: true,
themeSystem: 'standard',
locale: 'de',
selectable: true,
droppable: true,
header: {
left: 'prev,next today createEvent',
center: 'title',
right: 'fourdays,dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
views: {
fourdays: {
type: 'resourceTimeline',
duration: { days: 4 },
buttonText: '4Days'
}
}

只有当我切换到时间轴视图时,才会发生这种情况。月、日、周和列表视图正在工作。知道怎么解决这个问题吗?

我已经降级到v4.3.1,错误不再出现。这显然是个bug。

相关内容

  • 没有找到相关文章

最新更新