javascript - Fullcalendar TypeError:无法读取 null 的属性“顶部”
问题描述
我收到一个错误,找不到任何解决方法:
Fullcalendar TypeError:无法读取 null 的属性“顶部”
这是我的配置:
config: {
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
defaultView: 'agendaOneDay',
defaultDate: new Date().toISOString().slice(0, -14),
minTime: '09:00',
maxTime: '10:00',
allDayDefault: false,
allDaySlot: false,
height: 500,
slotLabelFormat: 'HH:mm',
timeFormat: 'HH:mm',
firstDay: 1,
slotDuration: '00:15:00',
columnFormat: 'ddd, DD MMM',
editable: false,
selectable: true,
eventRenderWait: 1000,
events: [],
resources: [],
views: {
agendaOneDay: {
type: 'agenda',
duration: { days: 1 },
buttonText: '1 day',
groupByResource: true,
},
agendaThreeDay: {
type: 'agenda',
duration: { days: 3 },
buttonText: '3 days',
groupByResource: true,
},
},
header: false,
eventClick: this.clickPlace,
eventRender: this.renderPlace,
},
如果有人知道如何解决此问题,请提供帮助。
当我加载开发人员页面时,我收到了这个错误。
TypeError: Cannot read property 'top' of null
at CoordCache.getTopPosition (fullcalendar.js?228e:5594)
at ResourceTimeGrid.TimeGrid.computeTimeTop (fullcalendar.js?228e:11988)
at ResourceAgendaView.AgendaView.computeInitialDateScroll (fullcalendar.js?228e:11487)
at ResourceAgendaView.View.applyScroll (fullcalendar.js?228e:3863)
at ResourceAgendaView.ResourceViewMixin.applyScroll (scheduler.js?acd0:245)
at ResourceAgendaView.View.applyQueuedScroll (fullcalendar.js?228e:3851)
at ResourceAgendaView.View.popScroll (fullcalendar.js?228e:3846)
at ResourceAgendaView.View.onRenderQueueStop (fullcalendar.js?228e:3570)
at RenderQueue.intercept (fullcalendar.js?228e:1535)
at RenderQueue.dispatch (jquery.js?1157:5183)
解决方案
我发现一个错误,我从中得到了配置的开始和结束时间,.toLocaleTimeString()
它返回了行09:00 AM
并且07:00 PM
,这是 fullcalendar 的错误格式
推荐阅读
- c++ - 具有原始类型的单个数组成员的标准布局结构的保证内存布局
- android - 模拟小米设备 Genymotion 或 Android Studio
- authentication - CAS SSO - 覆盖 LDAPHandler
- angular - 角度材质对话框 - 将类型传递给对话框组件
- r - 如果变量仅填充一年,如何删除 ID?
- awk - 用于可变长度文件的多种模式的 awk
- android - 如何在类似于 Gmail 的某个 ListView 项目之后添加分隔符
- highcharts - 堆积列不格式化 x 轴上的日期时间戳
- ansible - 如何从存储在 Ansible 寄存器中的 shell 命令输出中获取所需内容?
- r - 尽管输入数据集,有没有办法在绘图的同一点绘制 annotation_custom() ?