Events Only Showing in Month View – FullCalendar

Hey everyone,

Ran into a bit of a problem with FullCalendar today after setting up a JSON feed. My events were only appearing in the month view. This StackOverflow post explains that this is due to the fact that the allDay property wasn’t set.

Original JSON

  1. [
    
  2.     "0",
    
  3.     {
    
  4.         "title": "Test event",
    
  5.         "id": "821",
    
  6.         "start": "2012-11-23 14:00:00",
    
  7.         "end": "2012-11-23 15:00:00"        
    
  8.     },
    
  9.     "1",
    
  10.     {
    
  11.         "title": "Test event 2",
    
  12.         "id": "822",        
    
  13.         "start": "2012-11-23 9:00:00",
    
  14.         "end": "2012-11-23 10:00:00"
    
  15.     },
    
  16.     "2",
    
  17.     {
    
  18.         "title": "Test event 3",
    
  19.         "id": "823",        
    
  20.         "start": "2012-11-24 8:00:00",
    
  21.         "end": "2012-11-24 6:00:00"
    
  22.     },
    
  23.     "3",
    
  24.     {
    
  25.         "title": "Test event 4",
    
  26.         "id": "824",        
    
  27.         "start": "2012-11-27 6:00:00",
    
  28.         "end": "2012-11-27 7:00:00"
    
  29.     }
    
  30. ]

Working JSON

  1. [
    
  2.     "0",
    
  3.     {
    
  4.         "allDay": "",
    
  5.         "title": "Test event",
    
  6.         "id": "821",
    
  7.         "start": "2012-11-23 14:00:00",
    
  8.         "end": "2012-11-23 15:00:00"        
    
  9.     },
    
  10.     "1",
    
  11.     {
    
  12.         "allDay": "",
    
  13.         "title": "Test event 2",
    
  14.         "id": "822",        
    
  15.         "start": "2012-11-23 9:00:00",
    
  16.         "end": "2012-11-23 10:00:00"
    
  17.     },
    
  18.     "2",
    
  19.     {
    
  20.         "allDay": "",
    
  21.         "title": "Test event 3",
    
  22.         "id": "823",        
    
  23.         "start": "2012-11-24 8:00:00",
    
  24.         "end": "2012-11-24 6:00:00"
    
  25.     },
    
  26.     "3",
    
  27.     {
    
  28.         "allDay": "",
    
  29.         "title": "Test event 4",
    
  30.         "id": "824",        
    
  31.         "start": "2012-11-27 6:00:00",
    
  32.         "end": "2012-11-27 7:00:00"
    
  33.     }
    
  34. ]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.