#5527 closed bug (fixed)
Datepicker: Problem selecting the date with keyboard shorcuts
Reported by: | azran1981 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8.7 |
Component: | ui.datepicker | Version: | 1.8 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
From http://forum.jquery.com/topic/problem-selecting-the-date-with-keyboard-shorcuts
Open the datepicker. Then using crtl+arrow select the date and then press enter, the first time the date is selected, but if you repeat this process 3 or 4 times, the date selection fails and it keeps the old value. This always works using the mouse.
you can test it here http://jqueryui.com/demos/datepicker/
I am using firefox and iexplorer 7,8
Change History (8)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Simple fix(I don't understand why we want to select the current, it's already selected. But I might be missing some logic so I keep it in there)
From this:
var sel = $('td.' + $.datepicker._dayOverClass, inst.dpDiv).add($('td.' + $.datepicker._currentClass, inst.dpDiv)); if (sel[0]){
To this:
var sel = $('td.' + $.datepicker._dayOverClass, inst.dpDiv); if(sel.length===0) sel = $('td.' + $.datepicker._currentClass, inst.dpDiv); if(sel.length!==0){
Regarding nmb.ten commit: Might "if(sel.length!==0)" be better then "if(sel)"?!
comment:3 Changed 13 years ago by
FYI: I feel that it should display the date picker on ctrl+down ( "home" is not used much ) also .attr('autocomplete','off') for the input element
comment:5 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Datepicker: made it possible to select a date in the selected month using enter. Fixes #5527 - Datepicker: Problem selecting the date with keyboard shorcuts
Changeset: 98f7e6a8d615772fbddbf185241d087a95e5e121
comment:6 Changed 12 years ago by
Milestone: | 1.9 → 1.8.7 |
---|
As of jQuery 1.4 the results from .add() will always be returned in document order (rather than a simple concatenation). http://api.jquery.com/add/. Fix: http://github.com/nmb10/jquery-ui/commit/3cc7a9c80aac6bbed447fa13dd4ced0c99a152ba