Skip to main content

Search and Top Navigation

#5011 closed bug (fixed)

Opened December 17, 2009 06:53PM UTC

Closed January 13, 2010 08:34AM UTC

DatePicker Check External Click bug

Reported by: jeffgran Owned by:
Priority: minor Milestone: 1.8
Component: ui.datepicker Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

I found a bug where the date picker will sometimes close (because of an external click) even if you clicked within the date picker. I found a solution that fixed it for me.

In the datepicker's _checkExternalClick function, I changed the line:

if (($target.parents('#' + $.datepicker._mainDivId).length == 0) &&


if (($target.parents().andSelf().filter('#' + $.datepicker._mainDivId).length == 0) &&

It was only checking if the click targets parents were the datepicker, not if you click directly on the date picker div itself.

Attachments (0)
Change History (2)

Changed December 23, 2009 06:05AM UTC by scottgonzalez comment:1

milestone: TBD1.8

This could probably use .closest().

Changed January 13, 2010 08:34AM UTC by kbwood comment:2

resolution: → fixed
status: newclosed

Already fixed by #4949 in r3491.