Issue 229: Error when calling calendar methods that have return values
Status:  Done
Owner: ----
Closed:  Dec 2009
Reported by bacoope...@gmail.com, Dec 6, 2009
I'm not sure if this is a bug or if I'm not doing something right, but when
I call .fullCalendar(‘getDate’) or .fullCalendar(‘getView’) I get the
following exception: "TypeError: w.data(this, "fullCalendar")[S] is undefined"

But other methods seem to work fine, such as prev, next, and render.  The
only pattern I'm seeing is that I get the error when ever I'm calling a
method that returns something.  Has anyone else experienced this?
Dec 8, 2009
#1 koz...@gmail.com
Just out of curiousity, you are calling the method on the defined calendar element:

example:

$('#calendar').fullCalendar('getView');


Dec 8, 2009
#2 koz...@gmail.com
I'm getting the same result...ignore the comment above....testing
Dec 8, 2009
#3 koz...@gmail.com
I notice that I can't just request the view.name by the method getView outside of a
triggered action.  But when I add it to the event triggers ("Triggered Actions" in
documentation) and pass that view object, then I can access it:

dayClick: function(view){
  console.log('view.name = ' + view.name);			
}

[using firebug in firefox, change console.log to alert if you are not (though u
should use firebug)]
Dec 8, 2009
#4 koz...@gmail.com
Confirmed bacooper81:
x.data(this, "fullCalendar")[U] is undefined

I've tried everything, but that method is failing.
Dec 8, 2009
Project Member #5 adamrs...@gmail.com
hello all,
the getData and getView methods were added in 1.4.2. sorry, the documentation on the
website is poor, and doesn't say which features were added in which versions (need
better website+docs). i only make separate docs for each major version.

so, the problem is that you probably have a version < 1.4.2. please use the newest
version. is this your problem?
Dec 8, 2009
#6 bacoope...@gmail.com
Yes that was this issue.  I was on 1.4.  When I updated to 1.4.2 it worked.  Btw,
thank you for this plugin, its great.
Dec 20, 2009
Project Member #7 adamrs...@gmail.com
glad you got it to work. i'm working on some new docs now.. should tell you at what
version # each option/method became available
Status: Done