FullCalendar时间线视图中的日期格式

FullCalendar时间线视图中的日期格式,fullcalendar,fullcalendar-scheduler,fullcalendar-4,Fullcalendar,Fullcalendar Scheduler,Fullcalendar 4,我正在尝试在Timeline视图中配置FullCalendar 4.3.1,以便在标题和列标题中以英国格式显示日期。我使用slotLabelFormat和titleFormat,如下所示: slotLabelFormat: [ { day: 'numeric', weekday: 'short', month: 'short'}, { hour: 'numeric' } ], titleFormat: {day: 'numeric', month: 'long', year: 'nume

我正在尝试在Timeline视图中配置FullCalendar 4.3.1,以便在标题和列标题中以英国格式显示日期。我使用slotLabelFormat和titleFormat,如下所示:

slotLabelFormat: [
  { day: 'numeric', weekday: 'short', month: 'short'},
  { hour: 'numeric' }
],
titleFormat: {day: 'numeric', month: 'long', year: 'numeric'}

这是可行的,但是,它不选择项目的顺序,所以我以12月31日而不是12月31日结束。有没有办法设置顺序或默认日期格式(基于位置)?我在文档中找不到它。

将以下内容添加到日历参数解决了它。谢谢大家


语言环境:“en gb”

默认情况下不,您必须遵守本机JS日期对象的行为(因为这些设置与此相关,fullCalendar使用这些设置格式化日期)。然而,如果你添加了一个插件,比如MomentJS,那么你就有了更多的控制权。请参阅中标题为“格式化字符串”的部分