[FullCalendar 2] Change axis time format: AM/PM to 12/24 Hours

[FullCalendar 2] Change axis time format: AM/PM to 12/24 Hours

  
Forge Component
(19)
Published on 2016-03-23 by Grazina
19 votes
Published on 2016-03-23 by Grazina

[INFO]

To change the axis time format it's just add the following structure in the input AgendaOptionsJSON of the weblock:

allDaySlot:false,

            allDayText:'all-day',

            axisFormat:'H:mm',

            slotDuration:'00:30:00',

            snapDuration:'00:30:00',

            scrollTime:'06:00:00',

            minTime:'00:00:00',

            maxTime:'24:00:00',

            slotEventOverlap:false


NOTE:

// Produces format strings like "h:mma" -> "6:00pm"

// Produces format strings like "h(:mm)a" -> "6pm" / "6:30pm"

// Produces format strings like "h(:mm)t" -> "6p" / "6:30p"

// Produces format strings like "ha" / "H" -> "6pm" / "18"

// Produces format strings like "h:mm" -> "6:30" (with no AM/PM)

// Produces format strings like time 'H(:mm)' -> "0:00"/ "23:59" uppercase H for 24-hour clock


Font
https://fullcalendar.io



Thank you Ruben for that info.

I'm sure it will help someone in the future!

[INFO]

To change the event time format it's just add the following structure in the input GeneralDisplayJSON of the weblock:

"header: {
    left: 'prev,next today',
    center: 'title',
    right: 'agendaDay,agendaWeek,month'
},
theme: false,
firstDay: 0,
isRTL: false,
weekends: true,
fixedWeekCount: false,
weekNumbers:false,
contentHeight:400,
eventLimit:'False',
editable:true,
timeFormat: 'H:mm'"


Font
https://fullcalendar.io