Frank
Frank

Reputation: 2357

How do i change the column time format in fullcalendar?

Am trying to change time format into 24H watch in full-calendar.

I tried to find it here but am unable to figure it out.

enter image description here

Here the code snippet:

jQuery('#calendar').fullCalendar({
    header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
    },
    editable: false,
    weekends: true,
    timeFormat: 'H:mmtt{-H:mmtt }',

Please have look to snap and help me. Thanks...

Upvotes: 7

Views: 8123

Answers (2)

Amin Safsafi
Amin Safsafi

Reputation: 159

I use FullCalender V4.2.0 this work for me:

        slotLabelFormat: [
        {
            hour: '2-digit',
            minute: '2-digit',
            hour12:false
        }
        ],

Upvotes: 13

ganeshk
ganeshk

Reputation: 5621

You can use axisFormat: 'HH:mm' to accomplish this. Let me know if this helps.


Just to complement: in version 2.4.0 this method was renamed to slotLabelFormat.

Upvotes: 17

Related Questions