0

I am working with some old code that used FullCalendar 1.6.1, which I am upgrading it to FullCalendar 3.5.0. The old code is using a call to a method called getAnnotations, which apparently has been deprecated and removed from FullCalendar 3.5.0.

I searched both on here and in the FullCalendar documentation, as well as in their GitHub issue tracker, and cannot seem to find any documentation concerning what this method has been replaced with. I am receiving the error "getAnnotations is an unknown FullCalendar method" when attempting to resize events on the calendar.

Here is the old code I am trying to convert to 3.5.0:

app.overlapsClosed = function(start, end) {
   annotations = $('#calendar').fullCalendar( 'getAnnotations' );
   startTime = start.getTime();
   endTime = end.getTime();
   if(typeof annotations != 'undefined') {
       for(i = 0; i < annotations.length; i++) {
           annStart = Date.parse(annotations[i].start);
           annEnd = Date.parse(annotations[i].end);

           if( (startTime >= annStart && startTime < annEnd) 
           || (endTime > annStart && endTime < annEnd) ) {
                    return true;
           }
        }
    }
    return false;
}
halfer
  • 19,824
  • 17
  • 99
  • 186
  • looking at the v1 docs (https://fullcalendar.io/docs1/) I can't see a "getAnnotations" method there, either. What was it supposed to do? Are you sure it wasn't from a plugin or fork? – ADyson Sep 13 '17 at 08:52
  • Perhaps if you describe what the feature does and what output it produces, then we can see if there is another way to do it in fullCalendar. – ADyson Sep 13 '17 at 09:00

0 Answers0