FullCalendar - Unknown option 'defaultDate'

Hello,I’m dealing with FullCalendar integration in 2023. What I’m trying to do is a Dashboard that will refresh every one minute and show:

  1. Week view for last week
  2. Week view for this week
  3. Week view for next week.

I have done php-side coding so this runs in a loop as it should.From the FullCalendar documentation, I can see that defaultDate parameter determines the week that needs to be shown.My plan is to set the defaultDate option on each refresh, so data from each of the three weeks will be shown consecutively.However, I’m not able to set defaultDate option with ew.calendarOptions.fullCalendarOptions.defaultDate with Page_Head event. There is an error: Unknown option ‘defaultDate’ when I’m trying to do that.calendarOptions object looks like that:

{
    "showViewPageOnEventClick": false,
    "useContextMenu": true,
    "usePopover": true,
    "fullCalendarOptions": {
        "headerToolbar": {
            "left": "",
            "center": "title",
            "right": ""
        },
        "themeSystem": "bootstrap",
        "initialView": "dayGridWeek",
        "dayMaxEventRows": true,
        "timeZone": "UTC",
        "droppable": true,
        "editable": true,
        "weekNumbers": true,
        "height": "auto",
        "selectable": false,
        "weekends": false,
        "weekNumberCalculation": "ISO",
        "firstDay": 1,
        "defaultDate": "2023-08-15"
    },
    "eventPopoverOptions": {
        "placement": "auto",
        "trigger": "hover",
        "html": true
    }
}

So, my next idea is to do that with Startup script, as per documentation. But, when I type

$(document).on("calendar", function (e, args) {
     console.log(args.options); // View all options
    });

in my report startup script, console shows nothing.

Use “initialDate” instead of “defaultDate”, read V5 Release Notes and Upgrade Guide → Current Date.

You may put this following code in Page_Head server event:

<script>
    ew.calendarOptions.fullCalendarOptions.initialView = 'dayGridWeek';
    ew.calendarOptions.fullCalendarOptions.initialDate = '2023-01-22';
</script>

mobhar wrote:

You may put this following code in > Page_Head > server event:

>

You are absolutely correct. I have figured it out just couple of minutes ago and went to write it here.
Thank you, this worked beautifly!