Full calendar to week on default view

Hello, i am trying to use this code to put the default view on the calendar to week:

// Page Load event
function Page_Load()
{
    $this->FullCalendar->setOption('defaultView', 'week');

}

but it is not working, any idea if this code it is correct?

FullCalendar is JavaScript, not PHP. Read DayGrid View and TimeGrid View.

You may search in this forum by using fullCalendarOptions keyword.

yes i was reading and try different options but no work, my last try was

<script>
    ew.calendarOptions.fullCalendarOptions.initialView: 'timeGridWeek';
</script>

but do not work

You should use = instead of : as the operator.

<script>
    ew.calendarOptions.fullCalendarOptions.initialView = 'timeGridWeek';
</script>

Perfect!!! thanks