fullcalendar

controlling the start week for a stacked month view


I've been using fullcalendar for 8 years, but not the new versions. I'm considering refactoring our application to access the new features but I'm having trouble figuring out whether what I need is possible.

When using the stacked month view (where a user can scroll down or up to view more months) can the begining month (the one in row 1) be customized. For example, our customers select an order pickup date from 21 available dates begining the last week of August and throughout September. Consequently the first 2 weeks of August are meaningless and prevent users from realizing there are lots of dates available further down the calendar (they just won't think to scroll down), so if I could show the last week of August, and then as much of September as would fit, then they would be inticed to scroll down since they realize dates in both August and September are possible.

i'm not using the latest version of fullcalendar so i'm seeking input so I know if it is worth my time and money to pay to upgrade

For example could I modify any of the attributes to make the first week in the list auto-scroll to the first date for which we have an opening (a list of dates is provided in an array)

import { Calendar } from '@fullcalendar/core'
import multiMonthPlugin from '@fullcalendar/multimonth'

const calendar = new Calendar(calendarEl, {
  plugins: [multiMonthPlugin],
  initialView: 'multiMonthYear',
  multiMonthMaxColumns: 1 // force a single column
});

Solution

  • For any of the month-based year views, no you cannot set any initial date more fine-grained than the beginning of a month - demo: https://codepen.io/ADyson82/pen/mybLXPQ

    It's the same if you use dayGridYear, for example, even with the initialDate option set:

    initialView: 'dayGridYear',
    initialDate: "2025-08-20"
    

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

    The layout is slightly different than the multi-month one (the months flow together in a single grid, rather than a headed grid for each month), so there's a possible compromise to be made there, but broadly those are your options.