2013-04-06 48 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

相關問題