2016-08-11 32 views
2
周我利用 fullcalendar

和我配置日曆不包括週末:完整的日曆標題標題匹配

$('#calendar').fullCalendar({ 
     weekends: false, 

然而headertitle屬性顯示的日期,從週日到週六。有沒有辦法改變標題,以便日期範圍也不包括週末?

回答

2

發現這個github issue。我剛剛測試了最新的fullcalendar 2.9.1,它的工作原理。您必須將該函數與8091行上fullcalendar.js中的函數進行交換。

computeTitle: function() { 

    var startDate, endDate; 

    if (this.intervalUnit == 'month') { 
     startDate = this.intervalStart; 
     endDate = this.intervalEnd; 
    } 

    else { 
     startDate = this.start; 
     endDate = this.end; 
    } 

    return this.formatRange(
    { start: startDate, end: endDate }, 
     this.opt('titleFormat') || this.computeTitleFormat(), 
     this.opt('titleRangeSeparator') 
    ); 
}