1

I am developing a React 18 application with TypeScript, and I'm utilizing the FullCalendar library to manage and display events. I'm looking to implement a specific calendar view where days are arranged as rows, and resources are displayed as columns. To give you a clear idea of what I'm aiming for, I've included an example image here.

I came across a related Stack Overflow question, but that thread has been inactive for quite some time. Due to this, I've decided to post a new question to gather updated insights.

I would like to know if there is a way to achieve this kind of layout using modern React and FullCalendar. Are there any pre-built custom views or specific configurations that I can use to accomplish this?

View example

I am using FullCalendar like this in my code:

const getCalendarViews = () => ({
  resourceTimelineWeek: {
    type: 'resourceTimeline',
    duration: {
      week: 1,
    },
  },
  resourceDayGridWeek: {
    type: 'resourceDayGrid',
    duration: {
      week: 3,
    },
  },
  resourceTimelineMonth: {
    type: 'resourceTimeline',
    duration: {
      month: 1,
    },
  },
  resourceDayGridMonth: {
    type: 'resourceDayGrid',
    duration: {
      month: 1,
    },
  },
});

const views = getCalendarViews();

      <FullCalendar
        ref={ref}
        editable
        selectable
        selectMirror
        dayMaxEvents
        firstDay={1}
        views={views}
        events={events}
        dayMinWidth={96}
        plugins={plugins}
        resources={resources}
        headerToolbar={false}
        resourceAreaWidth="240px"
        slotDuration={{ days: 1 }}
        eventStartEditable={false}
        datesAboveResources={false}
        eventDurationEditable={false}
        eventResizableFromStart={false}
        initialView={CalendarGridView.HORIZONTAL_WEEK}
        schedulerLicenseKey={FULL_CALENDAR_LICENSE_KEY}
        filterResourcesWithEvents={hideEmptyResourcesModel.value}
        slotLabelContent={slot => <CalendarDateCell slot={slot} />}
        eventContent={e => <RentEvent fcEvent={e} events={rentals} />}
        resourceLabelContent={args => <CalendarResourceLabel label={args.resource.title} />}
        resourceAreaColumns={[
          {
            headerContent: <CalendarResourceHeader productSection={productsSection} />,
          },
        ]}
      />
  • No there still isn't a way to configure this in fullcalendar. Anything that exists is mentioned in the documentation already. If you would like there to be such an option, consider making a feature request (or voting for an existing one, if it has already been submitted) - see https://fullcalendar.io/requesting-features – ADyson Aug 29 '23 at 07:00
  • @ADyson that's very unfortunate, I've also create this mirror https://github.com/fullcalendar/fullcalendar/issues/7438 issue, hope it gets some attention soon. All exsisting conversations related to this topic are so outdated. – Ilya Kruchinin Aug 29 '23 at 13:01
  • 1
    Thanks. Although I don't know why you say it should be a feature for the React connector specifically? Any new view, or view option, developed should surely be applicable to any fullCalendar connector, and the base one? It does not require React in order to implement it. – ADyson Aug 29 '23 at 13:10

0 Answers0