views:

142

answers:

1

I am working on an application which works with GPS data. Part of the application is a calendar which displays dates for which data is available for a particular device. We then use the YUI Calendar to display this visually.

The call to our server looks something like this:

http://example.com/listgpsdates?device%5Fid=xx&year=2009&month=11

This would return a JSON array of days in Nov. 2009 for which data is available. I use that along with the Calendar's custom rendering stack to show which dates have available data vs. those that would return data. And, of course, there is a selectedEvent listener registered which actually retrieves the GPS data for a particular day and puts it on a map.

I have tried to load all the dates for a device without limiting it to a month, but it is rather slow - the available dates are loaded by selecting distinct values from the full data table. I would like to be able to just make a request to the server when the month changes (or the device changes), just for that month, and update the calendar appropriately.

After reading the Calendar API, I concluded that there is no way to get the month + year that is currently displayed (could it be problematic for multiple months?). And when I subscribe to the changePageEvent, I am only getting an empty array for the arguments. I have searched and seen a few posts about the changePageEvent, but even after updating to the latest version (2.8.0r4), I am not getting the arguments for the changePageEvent.

I suppose there must be an internal variable in the Calendar that keeps track of the current page / date, but I need access to this even if there are no currently selected dates.

Thanks for any help!

A: 

FYI, I posted a response (to your yuilibrary post) here:

http://yuilibrary.com/forum/viewtopic.php?f=89&t=1817&p=5914#p5914

Regards, Satyen

Satyen Desai
the answer on yuilibrary was great, thanks.
ruquay