Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Re: how do I access events in the basic Calendar?

Expand Messages
  • Matt Warden
    ... Hash: SHA1 ... It is a method of calendar (you can see this if you look at the API documentation). Hence: cal.onSelect = myfunction; cal.onDeselect =
    Message 1 of 3 , Mar 3, 2006
    • 0 Attachment
      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      casiewelch wrote:
      > When I modify the code above like so:
      >
      > YAHOO.util.Event.addListener(cal1.id, "onSelect", fnTest);

      It is a method of calendar (you can see this if you look at the API
      documentation). Hence:

      cal.onSelect = myfunction;
      cal.onDeselect = myotherfunction;

      etc.

      To anticipate the next question, apparently you can get the date
      selected by doing this:

      var datejustadded = (calAvailability.getSelectedDates())[0];

      Although that doesn't seem to be documented anywhere, and I would much
      prefer it being automatically passed to onselect as an argument (similar
      to renderers).

      - --
      Matt Warden
      Miami University
      Oxford, OH, USA
      http://mattwarden.com


      This email proudly and graciously contributes to entropy.
      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1.4.1 (GNU/Linux)
      Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

      iD8DBQFECHBVrI3LObhzHRMRAhMXAKC4mbGVeCNEf+s07cW7EFyRONiUjACeMsI8
      z/G7XMVPXdzolw9GOgcem0w=
      =bdVC
      -----END PGP SIGNATURE-----
    Your message has been successfully submitted and would be delivered to recipients shortly.