2017年Fullcalendar调度程序的标签出错

时间:2016-09-05 13:31:46

标签: label fullcalendar scheduler

我正在使用fullcalendar的调度程序插件版本 1.0.0

我在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'
            }],
}

1 个答案:

答案 0 :(得分:0)

更新:

我错了,我不明白为什么或如何解决我的问题。源代码来自版本 2.9.0

中的 moment.js 文件

以下是我修改的行(评论原文)

_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
    },

每次我在fullcalendar中更改视图时都会生成javascript错误,但天数标签很好。

有人可以解释为什么以及是否有其他工作来实现我的目标?

感谢' S