24 hour time format (so no AM to PM) for fullCalendar

后端 未结 13 1287
日久生厌
日久生厌 2020-12-25 12:09

I\'m trying to display the 24 hour time format in fullCalendar, I\'m trying to use these instructions: http://arshaw.com/fullcalendar/docs/text/timeFormat/

So I\'ve

13条回答
  •  暖寄归人
    2020-12-25 12:40

    As of fullCalendar.io version 4, depending on where you want the format to change, use eventTimeFormat, titleFormat, columnHeaderFormat or slotLabelFormat (last one for the axis in timegrids) in the following form :

    eventTimeFormat: {
      hour: '2-digit', //2-digit, numeric
      minute: '2-digit', //2-digit, numeric
      second: '2-digit', //2-digit, numeric
      meridiem: false, //lowercase, short, narrow, false (display of AM/PM)
      hour12: false //true, false
    }
    

    The comments display the value options.

    For more reference: https://fullcalendar.io/docs/date-formatting

提交回复
热议问题