Calendar - Full year

HI all.

I have been able to get the calendar to open in the full year view with out an issue.

here is the code:

function Page_Load(): void
{
    $this->CalendarOptions->import([
        "headerToolbar.right" => "multiMonthYear,dayGridMonth,timeGridWeek,timeGridDay,listWeek", // Set toolbar with Year
        "initialView" => "multiMonthYear", // Set initial view to Year
        // "multiMonthMaxColumns" => 1, // Max columns of months (default is 3)
        // "multiMonthMinWidth" => 500, // Minimum month width (default is 350px)
        // "multiMonthTitleFormat.month" => "short", // Format above each month (default is { month: 'long' }, i.e. "January")
    ]);

    // Create custom view (quarter), see https://fullcalendar.io/docs/custom-view-with-settings
    // $this->CalendarOptions->import([
    //     "views.quarter" => [ "type" => "multiMonth", "duration" => [ "months" => 3 ] ],
    //     "headerToolbar.right" => "quarter,dayGridMonth,timeGridWeek,timeGridDay,listWeek",
    //     "initialView" => "quarter"
    // ]);
}

my issue is it now opens in 2024 where the first entry is.

How would i get this to open in the current year?

1 Like

You better add filter to your source table/view and exclude events older than what you want to show.