The simplest way to get the currently selected date(s) of a Calendar instance is
just to call getSelectedDates() on the instance, which will return an array of
Date objects:
http://developer.yahoo.com/yui/docs/YAHOO.widget.Calendar.html#method_getSelecte\
dDates
Your code would look like:
var dates = myCalendar.getSelectedDates();
Have you tried this method?
John
--- In ydn-javascript@yahoogroups.com, "gjozzimo" <gjozzimo@...> wrote:
>
> In this example the dates selected are written to the page via innerHTML.
http://developer.yahoo.com/yui/examples/calendar/events.html
>
> I am trying to capture the date selected by the user and use it as a variable
in another script. I've tried numerous way of capturing the date selected via
one of the functions provided and ones I've created without success. It looks
straight forward, but I cant' wrap my head around why the functions provided
won't return a variable I can use. They all end up "undefined". Any insight
would be appreciated. Thanks
>