Search and Top Navigation
#5527 closed bug (fixed)
Opened April 19, 2010 11:55AM UTC
Closed November 30, 2010 10:47PM UTC
Last modified October 18, 2012 05:49PM UTC
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
Attachments (0)
Change History (8)
Changed May 31, 2010 01:37PM UTC by comment:1
Changed June 24, 2010 02:56PM UTC by comment:2
'''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)"?!
Changed June 24, 2010 03:20PM UTC by comment:3
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
Changed November 24, 2010 06:27PM UTC by comment:4
Committed proposed solution to GitHub.
Changed November 30, 2010 10:47PM UTC by comment:5
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
Changed December 08, 2010 06:36PM UTC by comment:6
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