Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery Full Calendar Default View Setting

Tags:

jquery

I am using jQuery Full calendar.

But I am not getting how to set the week view as Default view in full calendar.

like image 223
Rajbir Singh Avatar asked Mar 05 '12 06:03

Rajbir Singh


4 Answers

Try:


$('#calendar').fullCalendar({
    defaultView: 'basicWeek'
    aspectRatio: 1.5
});

Ref: FullCalendar Available Views

Edited:


$('#calendar').fullCalendar({
    header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,basicWeek,basicDay'
    },
    defaultView: 'basicWeek'
....

like image 172
Sudhir Bastakoti Avatar answered Oct 24 '22 10:10

Sudhir Bastakoti


Use the defaultView option:

$('#myCalendar'-.fullcalendar({
     defaultView: 'basicWeek'
})
  • defaultView option
  • Available views
like image 24
Didier Ghys Avatar answered Oct 24 '22 10:10

Didier Ghys


To get a calendar with a view of the week and hours:

$('#calendar').fullCalendar({
    defaultView: 'agendaWeek'
});
like image 2
lin Avatar answered Oct 24 '22 08:10

lin


in v5 is initialView: 'timeGridWeek'

like image 2
Vahap Gencdal Avatar answered Oct 24 '22 10:10

Vahap Gencdal