reactjsfullcalendarfullcalendar-6

FullCalendar React - Setting Monday as the first day of the week


I'm using FullCalendar with React, and I'm trying to set Monday as the first day of the week specifically for the timeGridWeek view. I have tried using the firstDay option, but it doesn't seem to work as expected.

Here's my current code for setting up the timeGridWeek view:

timeGridWeek: { buttonText: 'Week', firstDay: 1 },

Despite specifying firstDay: 1, the calendar still starts with Sunday.

I expected the timeGridWeek view to start with Monday as the first day of the week.


Solution

  • firstDay isn't an option which can be applied specifically to a single view. You must specify it globally:

    views: {
      timeGridWeek: { buttonText: 'Week' }
    },
    firstDay: 1
    

    Demo: https://codepen.io/ADyson82/pen/eYXWMLx

    If you want to request an enhancement to enable that, see fullCalendar's Requesting Features guide.