2012-06-26 18 views
1

我想在議程視圖中禁用allDay選項。我希望它在周和月視圖中可見。agendaView allDaySlot和AllDayText false

現在,我有這樣的:JS

var calendar = $('#calendar').fullCalendar({ 
    slotMinutes: 15, 
    defaultView: 'agendaWeek', 
    header: { 
     left: 'prev,next today', 
     center: 'title', 
     right: 'month,agendaWeek,agendaDay' 
    }, 
    selectable: true, 
    selectHelper: true 
}); 

和另一個200行,但這裏是我的日曆對象的初始化。

我可以爲viewObject構造函數做下面的代碼嗎?

view: { 
     view:'agendaDay', 
     allDaySlot:false, 
     allDayText:false 
     }, 

我該怎麼做?

回答

0

您實際上正在尋找用於fullCalendar的選項設置器。所以,你可以做這樣的事情:

viewDisplay: function(view) { 
    if(view.name == 'agendaDay'){ 
     $('#calendar').fullCalendar('allDaySlot',false); // Not supported yet 
    } 
} 

我一直夢想着這個爲好,但不幸的是FullCalendar不允許設置飛尚選項。但以下兩個鏈接可能對你有用:

http://code.google.com/p/fullcalendar/issues/detail?id=293

https://github.com/arshaw/fullcalendar/pull/25

相關問題