2

I am trying to configure FullCalendar 4.3.1 in Timeline view to display date in UK format in the title and on column headers. I use slotLabelFormat and titleFormat as below:

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

This works, however, it does not choose the order of items so I end up with Mon Dec 31 instead of Mon 31 Dec. Is there a way to set the order or default date format (based on location)? I can't find it in the docs.

blitz
  • 623
  • 5
  • 18
  • By default no, you're stuck with the behaviour of the native JS Date object (because that's what these settings related to, and what fullCalendar uses to format the dates). However, if you add a plugin such as MomentJS then you have more control. See the section titled "Formatting Strings" in https://fullcalendar.io/docs/date-formatting – ADyson Dec 21 '19 at 10:13

1 Answers1

1

Adding the below to calendar parameters resolved it. Thanks all.

locale: 'en-gb'

blitz
  • 623
  • 5
  • 18