2013-04-06 85 views
0

我正在jquery fullcalendar插件上工作。这个插件默认显示整个和周。但是,我只想显示周和日。我改变了这个选项,以便当用户加载页面时,它会自动加载星期日历,但它仍然加载月,并查看星期用户必须单击星期选项卡才能看到它。 如何更改此默认行为,以便用户在加载网站时查看周历?只想在fullcalendar插件中显示周和日

$('#calendar').fullCalendar({ 
    header: { 
     left: 'prev,next today', 
     center: 'title', 
     right: 'agendaWeek,agendaDay', 
     ignoreTimezone: false 
    }, 
    selectable: true, 
    selectHelper: true, 
    editable: true, 
    events: 'events' 
}); 

回答

3

只需添加defaultView: 'basicWeek'您fullCalendar选项:

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

检查documentation

Demo

相关问题