uonic
uonic

Reputation: 41

Fullcalendar TypeError: Cannot read property 'top' of null

I'm getting an error and couldn't find any way to fix it:

Fullcalendar TypeError: Cannot read property 'top' of null

This my config:

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,
  },

If someone knows how to fix this please help.

And when I load developer page I getting this error.

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)

Upvotes: 1

Views: 1831

Answers (1)

uonic
uonic

Reputation: 41

I'm find an error, I'm get the start and end time for config from .toLocaleTimeString() it returned the lines 09:00 AM and07:00 PM, this is the wrong format for fullcalendar

Upvotes: 2

Related Questions