Re: YUI Calendar, how to render an a week on a hover?
- View SourceUnfortunately, that answer uses the deprecated Calendar_Core class.
Does anyone know where the
function went to, so I can replicate this using the more up to date yui?
- View Source
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
> > 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:
- View SourceHere's the domEventMap example:
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
Hope that helps,
- View Source*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!
> Here's the domEventMap example:
> 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
> Hope that helps,