Search code examples
drupaldrupal-7fullcalendar

Display hours format 24h in FullCalendar


I'm using FullCalendar in Drupal 7.

I'm trying to make a weekly calendar with available hours, I'm having problems with the 24h schedule, the hours that should be 13:00 show only 13, without the: 00, 13:20 works normally, only the: 00 does not show.

I'm using Axis format like this: H (: mm)

Attached is some images for better understanding, could anyone help me?

Problem in FullCalendar.

Problem in FullCalendar

Config in Views of Drupal 7. Config in Views of Drupal 7


Solution

  • You should use

    HH:mm
    

    for a full 24-hr format.

    H(:mm), which you've got now, means that

    • you see single digit hours in the early hours (0, 1, 2 instead of 00, 01, 02 etc ), and
    • the brackets indicate that the minutes should not be visible when they're zero (00).

    See https://fullcalendar.io/docs/utilities/date_formatting_string and https://momentjs.com/docs/#/displaying/format for more details of the formatting strings and what options you can set.