| Issue 2089: | destroy method does not return the calendar element | |
| 1 person starred this issue and may be notified of changes. | Back to list |
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!
May 25, 2014
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
|
|
| ► Sign in to add a comment |
Labels: Type-Bug milestone-date