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

Re: YUI Calendar, how to render an a week on a hover?

Expand Messages
  • Satyen Desai
    Hi, Just wanted to point out that the example link is based on a fairly old version of Calendar [ 11.3 ], so if you re working with a more recent version of
    Message 1 of 6 , May 1, 2007
    • 0 Attachment

      Hi,

      Just wanted to point out that the example link is based on a fairly old version of Calendar [ 11.3 ], so if you're working with a more recent version of Calendar, you'll need to revisit the code in the over-ridden doCellMouseOver, doCellMouseOut methods, to make sure they're still compatible.

      For example, Calendar_Core has been deprecated, but you can use YAHOO.util.Dom.addClass, removeClass to modify the row element's CSS classes instead.

      You may also be able do this without over-riding the methods (so that it's not as susceptible to changes in the Calendar implementation) using domEventMap. http://developer.yahoo.com/yui/docs/YAHOO.widget.Calendar.html#domEventMap and using the CSS class for selectable cells - Style.CSS_CELL_SELECTABLE

      I can try and post something which uses this for your specific use case, but if you want to get started with a domEventMap based solution, here's another thread which shows how it can be used: http://tech.groups.yahoo.com/group/ydn-javascript/message/8685 (see the code which sets up domEventMap)

      Regards,

      Satyen

       

       


      --- In ydn-javascript@yahoogroups.com, "tonsrot" <tonsrot@...> wrote:
      >
      > --- In ydn-javascript@yahoogroups.com, "tonsrot" tonsrot@ wrote:
      > >
      > > Trying to have the YUI calendar highlight the current week that it is
      > > currently hoving over, versus just the single date.
      > >
      > > Really stumped on where to really beginning. Anyone have any ideas?
      > >
      >
      > bah, and I found it a hour later ;)
      >
      > For anyone interested:
      > http://www.culture.gov.sk/extras/yui/examples/calendar/row_highlight/index.html
      >

    • Satyen Desai
      Here s the domEventMap example: http://yuiblog.com/sandbox/yui/v222/examples/calendar/domEventMap.html Ideally, this and the original example could be modified
      Message 2 of 6 , May 1, 2007
      • 0 Attachment
        Here's the domEventMap example:

        http://yuiblog.com/sandbox/yui/v222/examples/calendar/domEventMap.html

        Ideally, this and the original example could be modified to be a
        little cleaner (and better performing) by not switching the TR CSS
        class for every TD mouseover/out but only when the row actually
        changes.

        Hope that helps,
        Satyen
      • tonsrot
        *picks jaw off floor* wow! That s awesome! That s pretty much exactly what I ve been trying to do, thanks a ton for the help!
        Message 3 of 6 , May 2, 2007
        • 0 Attachment
          *picks jaw off floor*

          wow! That's awesome! That's pretty much exactly what I've been trying
          to do, thanks a ton for the help!

          --- In ydn-javascript@yahoogroups.com, "Satyen Desai" <sdezzi@...> wrote:
          >
          > Here's the domEventMap example:
          >
          > http://yuiblog.com/sandbox/yui/v222/examples/calendar/domEventMap.html
          >
          > Ideally, this and the original example could be modified to be a
          > little cleaner (and better performing) by not switching the TR CSS
          > class for every TD mouseover/out but only when the row actually
          > changes.
          >
          > Hope that helps,
          > Satyen
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.