2014-10-02 31 views

回答

0

拉源,使用此代碼(可能需要一些額外的變化)。

的src /議程/ AgendaThreeDayView.js

fcViews.agendaThreeDay = AgendaThreeDayView; 

function AgendaThreeDayView(a) { 
    AgendaView.call(this, a); 
} 

AgendaThreeDayView.prototype = createObject(AgendaView.prototype); 

$.extend(AgendaThreeDayView.prototype, { 
    name: "agendaThreeDay", 
    incrementDate: function(a, b) { 
     return a.clone().stripTime().add(b, "days"); 
    }, 
    render: function(a) { 
     this.intervalStart = a.clone().stripTime(); 
     this.intervalEnd = this.intervalStart.clone().add(3, "days"); 
     this.start = this.skipHiddenDays(this.intervalStart); 
     this.end = this.skipHiddenDays(this.intervalEnd, -1, true); 
     this.title = this.calendar.formatRange(this.start, this.end.clone().subtract(1), this.opt("titleFormat"), " — "); 
     AgendaView.prototype.render.call(this, 3); 
    } 
}); 

編輯: 記住,你需要將文件添加到lumbar.json

在這裏尋找如何編譯:https://github.com/arshaw/fullcalendar/wiki/Contributing-Code

1

Full Calendar的2.2.5+版本內置了這種定製功能。

您需要做的僅僅是這樣的:

views: { 
    agendaThreeDay: { 
    type: 'agenda', 
    duration: { days: 3 }, 
    buttonText: '3 day' 
    }, 
    defaultView: 'agendaThreeDay' 
} 

你可以在此從文檔頁面here更多信息。