Angular7 FullCalendar error: Cannot read property 'length' of undefined

Angular7 FullCalendar error: Cannot read property 'length' of undefined

我正在尝试 FullCalendar version 4.3 on a clean Angular 7.2.0 application. I am following this official guide。当我加载一个简单的空日历时,它工作正常。一旦我添加任何事件并且应该显示该事件,它就会抛出一个错误而不显示该事件。

包含事件的完整日历(从文档中复制):

<full-calendar
  defaultView="dayGridMonth"
  [plugins]="calendarPlugins"
  [weekends]="false"
  [events]="[
    { title: 'event 1', date: '2019-08-06' },
    { title: 'event 2', date: '2019-08-07' }
  ]"
></full-calendar>

错误:

ERROR TypeError: Cannot read property 'length' of undefined
    at DayGridView.push../node_modules/@fullcalendar/core/main.esm.js.View.computeEventDraggable (main.esm.js:7575)
    at DayGridEventRenderer.push../node_modules/@fullcalendar/daygrid/main.esm.js.SimpleDayGridEventRenderer.renderSegHtml (main.esm.js:218)
    at DayGridEventRenderer.push../node_modules/@fullcalendar/core/main.esm.js.FgEventRenderer.renderSegEls (main.esm.js:7799)
    at DayGridEventRenderer.push../node_modules/@fullcalendar/core/main.esm.js.FgEventRenderer.renderSegs (main.esm.js:7763)
    at DayGrid.res [as renderFgEvents] (main.esm.js:3183)
    at DayGrid.push../node_modules/@fullcalendar/daygrid/main.esm.js.DayGrid.render (main.esm.js:742)
    at DayGrid.push../node_modules/@fullcalendar/core/main.esm.js.Component.receiveProps (main.esm.js:3881)
    at SimpleDayGrid.push../node_modules/@fullcalendar/daygrid/main.esm.js.SimpleDayGrid.render (main.esm.js:1518)
    at SimpleDayGrid.push../node_modules/@fullcalendar/core/main.esm.js.Component.receiveProps (main.esm.js:3881)
    at DayGridView.push../node_modules/@fullcalendar/daygrid/main.esm.js.DayGridView.render (main.esm.js:1584)

我在 github 上找到了 this example angular project,效果很好。我从 scatch 重新创建了项目,将 FullCalendar 版本更新到 4.3.0(最新),没有任何问题。我无法弄清楚原始应用程序出了什么问题,但是如果有人在使用它时遇到问题,示例项目会有所帮助。