Opened 13 years ago

Closed 13 years ago

#5011 closed bug (fixed)

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.

Change History (2)

comment:1 Changed 13 years ago by Scott González

Milestone: TBD1.8

This could probably use .closest().

comment:2 Changed 13 years ago by kbwood

Resolution: fixed
Status: newclosed

Already fixed by #4949 in r3491.

Note: See TracTickets for help on using tickets.