0

I'm using Fullcalendar.io to render a calendar. For some reason, the last event always shows as "+1 more" instead of a bar like the previous events. enter image description here

JSON looks like

                {
                    "events": [
                        {
                            "lid": "5",
                            "sGroupID": "5",
                            "start": "2023-07-10T08:00:00",
                            "end": "2023-07-14T09:00:00",
                            "startTimex": "08:00:00",
                            "endTimex": "09:00:00",
                            "color": "#9BB02B",
                            "title": "test"
                        },
                        {
                            "lid": "6",
                            "sGroupID": "5",
                            "start": "2023-06-26T08:00:00",
                            "end": "2023-06-30T17:00:00",
                            "startTimex": "08:00:00",
                            "endTimex": "17:00:00",
                            "color": "#3C00D4",
                            "title": "test2"
                        },
                        {
                            "lid": "7",
                            "sGroupID": "5",
                            "start": "2023-06-05T20:00:00",
                            "end": "2023-06-09T23:00:00",
                            "startTimex": "20:00:00",
                            "endTimex": "23:00:00",
                            "color": "#4F0B2B",
                            "title": "test3"
                        }
                    ]
                }

and code is

                      var calendar = new FullCalendar.Calendar(calendarEl, {
                          initialDate: currentDate,
                          editable: true,
                          selectable: true,
                          initialView: "multiMonthYear",                
                          height:800,
                          timeZone: "US",
                          multiMonthMaxColumns:1,       
                          nextDayThreshold: "00:00",                                  
                          businessHours: true,      
                              eventClick: function(info) {                                   
                                 console.log(info.event.extendedProps.lid );                                        
                                 console.log(info.event.extendedProps.sGroupID );                                       
                                 console.log(info.event.title);                                      
                                 console.log(info.event.extendedProps.startTimex );  
                                 console.log(info.event.extendedProps.endTimex );  
                                 console.log(info.event.startStr);
                                 console.log(info.event.endStr);                                     
                              },      
                          events: json.events                     
                      });

                      calendar.render();
                      spinner(0);

Why is the last event not rendering correctly?

ADyson
  • 57,178
  • 14
  • 51
  • 63
Shawn
  • 3,031
  • 4
  • 26
  • 53
  • See: [`eventLimit`](https://fullcalendar.io/docs/v4/eventLimit) – Sally loves Lightning Jul 01 '23 at 00:59
  • Setting eventLimit to false makes no difference. It looks like any events past the first 2 are displayed as +1 instead of a block of color. – Shawn Jul 01 '23 at 14:32
  • 1
    Removing initialView: "multiMonthYear" makes it display correctly, though I it doesn't display exactly how I want. I will just work with this. – Shawn Jul 01 '23 at 14:43
  • 1
    The previous link you were given was to old documentation for an older version. Up to date info can be found at https://fullcalendar.io/docs/event-popover and the linked articles – ADyson Jul 02 '23 at 18:54
  • @LightningMcQueen is there a particular reason you provided a link to a previous version of fullcalendar? That information is out of date. – ADyson Jul 02 '23 at 18:54
  • 1
    Nice catch, @ADyson No, I didn't have any reason. I thought that was up to date version, I should focus more next time. Thanks again! – Sally loves Lightning Jul 02 '23 at 19:50
  • Thanks for that update. There is only 1 event for that day. Fiddling with dayMaxEventRows makes no difference. This is on a wordpress site. If I take my code to a stand-alone HTML file, it works so there must be something in WP that is making it break. – Shawn Jul 03 '23 at 19:13
  • Maybe it's some kind of CSS issue where it is interfering with the fullCalendar CSS? Without a [mre] of the issue that's my best guess, unfortunately. – ADyson Jul 03 '23 at 21:21
  • If I make a standalone example, it works as expected so it's certainly a WP issue. Thank you for your input. – Shawn Jul 05 '23 at 13:18

0 Answers0