0

I am using FullCalendar3.5.1 Everything working correctly except when there are more than one event for the day (they comes dynamically through JSON), it just display +N more.The examples I have seen it should display atleast one event title and then say +(N-1) more. But for me, even if there are 2 events it display none and say +2 more enter image description here

$(document).ready(function() {

    $('#calendar').fullCalendar({
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
        defaultDate: new Date(),
        editable: true,
        eventBackgroundColor: '#3672BB',
        eventLimit: {               
            'default': false // display all events for other views
        },
        eventClick: function(calEvent, jsEvent, view) {
            if (calEvent.isSvey){
                LoadApptPage(calEvent.eventID,'2');
                }
            else{
                LoadApptPage(calEvent.eventID,'1');
            }
        },
        events: [{"aID":"62241-008","start":"10\/11\/2017","eventID":9608,"isSvey":1,"autoschld":0,"missed":0,"title":"62241-008 - "},{"aID":"162215-003","start":"10\/11\/2017","eventID":9606,"isSvey":1,"autoschld":0,"missed":0,"title":"162215-003 - Construction LLC"},{"aID":162738,"start":"10\/24\/2017","eventID":9607,"isSvey":1,"autoschld":1,"missed":0,"title":"162738 - "}],
        eventRender: function(event, element) {
            //element.find(".fc-title").remove();
            element.find(".fc-time").remove();
            var pbSveyFlag = event.isSvey ? 2 : 1;
            //var new_description =   '<a style="color:#FFF;font-Weight:bold;" href="javascript:LoadApptPage(' + event.eventID +',' + pbSveyFlag +')">' 
            //  + event.title + '</a><br/><br/> +'
            var new_description = 
                 '<br/><a style="color:#FFF;font-Weight:bold;" href="javascript:LoadFurPage(' + '&#39;' + event.aID + '&#39;' +',' + '&#39;'+pbSveyFlag +'&#39;' +')">'
                + '<strong>View: </strong>'  + '</a>' + '&nbsp;&nbsp;&nbsp;&nbsp;'
                + generateLink(event.autoschld,event.missed,event.eventID,event.aID)

            ;
            element.append(new_description);
        }
    });

});

CFML_Developer
  • 1,565
  • 7
  • 18

1 Answers1

2

Your eventLimit syntax is incorrect. You only need to specify false, like so:

eventLimit: false,

In fact the default is false, so you can simply leave this out all together and it will work the same.

Working JSFiddle. I had to remove your reference to generateLink(), it is not relevant to the current problem. I also removed your eventClick callback as it is not relevant to the current problem.

Side note - your start values do not need the slashes escaped. Also, they are not Moment-ish values (as described in the docs, so generate warnings on the console. The docs link to the ISO8601 Wikipedia page which shows several examples of suitable date formats. If you don't have times, the simplest would be just to use YYYY-MM-DD:

"start":"2017-10-11",
Don't Panic
  • 13,965
  • 5
  • 32
  • 51