Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i change the column time format in fullcalendar?

Tags:

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...

like image 975
Frank Avatar asked Dec 07 '12 10:12

Frank


2 Answers

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.

like image 66
ganeshk Avatar answered Nov 23 '22 18:11

ganeshk


I use FullCalender V4.2.0 this work for me:

        slotLabelFormat: [
        {
            hour: '2-digit',
            minute: '2-digit',
            hour12:false
        }
        ],
like image 35
Amin Safsafi Avatar answered Nov 23 '22 19:11

Amin Safsafi