Opened 9 years ago

Closed 9 years ago

#9891 closed bug (notabug)

jQueryUI tooltip widget disappears from datepicker widget after one click

Reported by: rjray Owned by:
Priority: minor Milestone: none
Component: ui.tooltip Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:


In my code, I created an always-visible datepicker() (tied to a div) with only selected days linked for clicking (using the beforeShowDay property). I then converted all the tooltips on the linked days with a call to $(selector).tooltip().

When rendered, the datepicker displays normally, and the clickable days all have the proper tooltip. However, once you click on any of the clickable days, all the tooltips revert back to the native UI tooltips.

To see this in action, I distilled it down to the following jsfiddle:

It seems that if I use the following selector, the problem presents itself:

$('div.dp-tt-demo a.ui-state-default').tooltip();

However, if I select at the div level, the problem does *not* present:


This happens in both 1.10.4 and 1.10.3, with various versions of jQuery up to and including 1.11.0.

Change History (1)

comment:1 Changed 9 years ago by tj.vantoll

Resolution: notabug
Status: newclosed

When you select a date the datepicker redraws itself, and the elements you bound tooltip widgets to are replaced. You need to use delegated tooltips, or re-apply the tooltip widgets in a select event.

The delegated approach is recommended and is what you're already doing with your $('div.dp-tt-demo').tooltip() approach.

If you need further help please use the forums or Stack Overflow.

Note: See TracTickets for help on using tickets.