Skip to main content

Search and Top Navigation

#4917 closed bug (fixed)

Opened October 19, 2009 07:40AM UTC

Closed December 15, 2009 03:42AM UTC

Last modified June 12, 2010 10:38AM UTC

Enter key press on popup fails if _dayOverClass td is after _currentClass td

Reported by: julian.jelfs Owned by:
Priority: minor Milestone: 1.8
Component: ui.datepicker Version: 1.7.2
Keywords: enter Cc:
Blocked by: Blocking:
Description

If using the keyboard to select a date from the popup, you navigate into the future and then hit enter it doesn't work. This is because of the following selector:

var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);

This returns the matching tds in the order they appear in the markup not in the order that the selectors are specified, but it then goes on to use sel[0]. The end result is that if the cell you have highlighted is after the current cell, the date does not get selected but if it is before, it does. In other words, it is only possible to navigate to a date in the past using the keyboard.

A possible fix would be to change the above code to:

var sel=$("td."+$.datepicker._dayOverClass, inst.dpDiv).add($("td."+$.datepicker._currentClass,inst.dpDiv));

I have patched my local version as above and it seems to behave correctly now.

Attachments (0)
Change History (2)

Changed November 16, 2009 08:12PM UTC by jzaefferer comment:1

milestone: TBD1.8

Changed December 15, 2009 03:42AM UTC by kbwood comment:2

resolution: → fixed
status: newclosed

Fixed in r3493.