Any ideas how to implement tipsy tooltips over jQuery's UI Datepicker? Basically I want to get a tooltip when the user moves on a specific date in the Datepicker. The Datepicker will be displayed inline and always visible.
Thanks!
Any ideas how to implement tipsy tooltips over jQuery's UI Datepicker? Basically I want to get a tooltip when the user moves on a specific date in the Datepicker. The Datepicker will be displayed inline and always visible.
Thanks!
That sounds pretty cool,
Here's my solution. Read the comments.
Inconveniences:
The
_updateDatepicker
method get's called also when the user selects a day form the visible month, or when you set a date viadatepicker('setDate', theDate)
, which could be a little inefficient.It relies in a private function of the Datepicker, if in future versions they decide to change it's functionality, or change the name, this code will break. Although because of the nature of the function I don't see that happening soon.
NOTE: My first approach was to hook to the
onChangeMonthYear
event of theui.datepicker
, but because the event is triggered, before the replacing of the dates in the calendar, theaddTipsys
method, would add the tipsy's to the calendar dates that are about to get cleared. Therefore the need to call theaddTipsys
event AFTER the elements get refreshed.EASY HACK: Hook a method to the
onChangeMonthYear
event of your calendar, and do a setTimeout to call the tipsy's. Some validation will need to be done.