Fullcalendar columnheaderformat属性

时间:2018-03-31 10:08:59

标签: fullcalendar

我正在使用fullcalendar(v3),我无法正确配置 columnheaderformat 属性。提前谢谢。

$('#calendar').fullCalendar({
     locale: 'es',
     firstDay: 1,
     defaultView: 'agendaWeek',
     header: false,
     footer: false,
     allDaySlot : false,
     slotEventOverlap: false,
     columnHeaderFormat: 'ddd'
});

3 个答案:

答案 0 :(得分:1)

我查看了我的完整日历版本及其v3.5.1。我用columnFormat更改了columnHeaderFormat,它运行正常。谢谢

答案 1 :(得分:0)

for fullcalendar v5.8.0+

dayHeaderFormat

    initialView: 'timeGridWeek',
      views: {
         timeGridWeek: {
         dayHeaderFormat: { weekday: 'long' },
         }
      },

enter image description here

答案 2 :(得分:-1)

如果您使用的是v4,请将此代码放在calendar.render()之前:

moment.updateLocale('es', {
        monthsShort : [ "Ene", "Feb", "Mar", "Abr", "May", "Jun","Jul", "Ago", "Sep", "Oct", "Nov", "Dic" ],
        months: [ "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio","Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre" ],
        weekdays: [ "Domingo","Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
        weekdaysShort: [ "Dom","Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"],
    });