FullCalendar does not display time from JSON events when allday false

I use FullCalendar and populate the calendar from ajax call.

But I can not get the time to display if allday is set to false

I watched FullCalendar not displaying time from JSON events , but it didn't seem to help.

This is the JSON I'm sending back:

] [{"ID": "18", "name": "r2222", "start": "2012-10-02 8:00:00", "end": "2012-10-02 11:00: 00 "," TextColor ":" # 000000 "," AllDay ": false," color ":" # FFFFFF "},

{"identifier": "1", "name": "Test 123", "start": "2012-10-16", "end": NULL, "TextColor": "# 000000", "AllDay" false " color ":" # FFFFFF "},

{"ID": "16", "name": "happy gallown", "start": "2012-10-31", "end": "2012-10-31", "TextColor": "# fffcfc" , "AllDay": true, "color": "# d92727"},

{"identifier": "17", "name": "repeated", "start": "2012-10-03 19:00:00", "end": "2012-10-03 21:00:00" , "TextColor": "# 000000", "AllDay" false "color": "# ff56ff"}]

+4
source share
2 answers

allDay case sensitive; change it from allDay to allDay - I just took 25 minutes to beware of this.

+6
source

You can follow this allday to allday , and the time should start: 2010-01-09T12:30:00 you need to add T between the date and time.

 events: [ { title : 'event1', start : '2010-01-01' }, { title : 'event2', start : '2010-01-05', end : '2010-01-07' }, { title : 'event3', start : '2010-01-09T12:30:00', allDay : false // will make the time show } ] 
-1
source

Source: https://habr.com/ru/post/1441424/


All Articles