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

RE: [ydn-javascript] Calendar and beforeSelectEvent

Expand Messages
  • Satyen Desai
    Sorry about the delayed response. If you re still looking for a solution, your best bet would be to over-ride the Calendar s out-of-the-box renderCellDefault
    Message 1 of 2 , Feb 4, 2008
      Sorry about the delayed response.

      If you're still looking for a solution, your best bet would be to
      over-ride the Calendar's out-of-the-box renderCellDefault and
      styleCellDefault methods.

      Removing the "selectable" class and anchor from the cells will prevent
      the cells from being selected. NOTE: This will only prevent UI
      interaction. You will still be able to programmatically select
      cells/dates.

      You can then add custom renderers to the mix also.

      Here's a quick example:

      http://yuiblog.com/sandbox/yui/v241/examples/calendar/readOnlyCalendar.h
      tml

      The YAHOO.util.Event.stopEvent method is intended to be used with Dom
      events and is not applicable to CustomEvents. Also the Calendar doesn't
      currently allow you to prevent selection via the beforeSelectEvent
      listeners.

      Hope that helps,
      Satyen
    Your message has been successfully submitted and would be delivered to recipients shortly.