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?
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} />,
},
]}
/>