2016-09-05 45 views
1

我使用fullcalendar的調度程序插件版本1.0.0 Fullcalendar調度的錯誤標籤,在2017年

我在J2EE環境中來的。

我們在法語中使用日曆,星期的第一天是星期一。它在2016年完美無瑕,但在2017年黯然失色。由於圖片更好地描述它,那就是:

Here it works fine, first day is monday (Lundi)

But here, the label is saturday (Samedi)

,並在所有與這個錯誤在今年繼續。如何解決這個問題?

這裏是我們使用的fullcalendar配置的一部分:

 $('#calendar').fullCalendar({ 
      schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives', 
      lang: 'fr', 
      firstDay: 1, 
      aspectRatio: 2.3, 
      scrollTime: '00:00', 
      allDaySlot: false, 
      weekNumbers: true, 
      defaultDate: getDateDuJour(), 
      selectable: true, 
      resourceAreaWidth: "20%", 
      eventOverlap: true, 
      // Pour déclencher un passage dans "events" lors d'un changement de mode de vue (jour, semaine...) 
      lazyFetching: false, 
      header: { 
       left: 'prevYear,prev,next,nextYear today', 
       center: 'title', 
       right: 'timelineMonth, timelineDay,timelineWeek,agendaWeek' 
      }, 
      defaultView: '#{controleur.planningCollectifDelegate.vue}', 
      views: { 
       timelineWeek: { 
        slotDuration: '01:00', 
        minTime: '09:00', 
        maxTime: '18:00', 
        hiddenDays: [0, 6], 
       }, 
       agendaWeek: { 
        buttonText: 'Agenda', 
        height: 200, 
        slotDuration: '00:30', 
        minTime: '09:00', 
        maxTime: '18:00', 
        hiddenDays: [0, 6], 
       }, 
       timelineDay: { 
        slotDuration: '00:30', 
        minTime: '08:00', 
        maxTime: '22:00', 
        hiddenDays: [0], 
       } 
      }, 
      resourceColumns: [ 
      { 
       labelText: 'Personnes', 
       field: 'title' 
      }], 
} 

回答

0

UPDATE:

我有,錯,我不明白爲什麼或者怎麼樣,解決了我的問題。源來自moment.js文件版本2.9.0

下面是我修改了行(在評論原件)

_weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), 
    /*weekdays: function(a) { 
     return this._weekdays[a.day()] 
    },*/ 
    _weekdaysShort: "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), 
    weekdaysShort: function(a) { 
     //return this._weekdaysShort[a.day()] 
     return this._weekdays[a.day()] 
    }, 
    _weekdaysMin: "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), 
    weekdaysMin: function(a) { 
     return this._weekdaysMin[a.day()] 
    }, 
    weekdaysParse: function(a) { 
     var b, c, d; 
     for (this._weekdaysParse || (this._weekdaysParse = []), b = 0; 7 > b; b++) 
      if (this._weekdaysParse[b] || (c = vb([2e3, 1]).day(b), d = "^" + this.weekdays(c, "") + "|^" + this.weekdaysShort(c, "") + "|^" + this.weekdaysMin(c, ""), this._weekdaysParse[b] = new RegExp(d.replace(".", ""), "i")), this._weekdaysParse[b].test(a)) return b 
    }, 

它每次更改時生成一個JavaScript錯誤在fullcalendar中查看,但天的標籤是好的。

有人可以解釋爲什麼,如果有另一個工作來實現我的目標?

謝謝