Enter key press on popup fails if _dayOverClass td is after _currentClass td
|Reported by:||julian.jelfs||Owned by:|
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. 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.