Issue 2089: destroy method does not return the calendar element
Status:  WontFix
Owner: ----
Closed:  May 2014
Reported by jonathan...@gmail.com, Feb 8, 2014
Steps to reproduce:
- Chain the destroy method with some other method like this:
  $('#my-calendar').fullCalendar('destroy').html("calendar destroyed!")

What was expected:
The html method should be applied to the #my-calendar element

What happens:
An error is thrown
TypeError: $(...).fullCalendar(...) is undefined

This used to work with the 1.4 version of fullcalendar, but doesn't work anymore.
A workaround is to split the chained call in 2 calls:
$('#my-calendar').fullCalendar('destroy').html("calendar destroyed!")
=>
$('#my-calendar').fullCalendar('destroy')
$('#my-calendar').html("calendar destroyed!")

If this behaviour is to remain, a note should be added to the upgrading to 2.x document

Thanks!
Mar 21, 2014
Project Member #1 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Reproducing
Labels: Type-Bug milestone-date
May 25, 2014
Project Member #2 adamrs...@gmail.com
destroy is a fullcalendar method, and methods are not guaranteed to return the jQuery object for the calendar. Rather, they often return other things.

The only time is guaranteed to return a jQuery object is when the element is being *initialized* with a calendar.

So, going with current convention, returning nothing this is expected behavior in this case.
Status: WontFix