Skip to main content

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:


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

I am using firefox and iexplorer 7,8

Attachments (0)
Change History (8)

Changed May 31, 2010 01:37PM UTC by nmb.ten comment:1

As of jQuery 1.4 the results from .add() will always be returned in document order (rather than a simple concatenation).


Changed June 24, 2010 02:56PM UTC by DoctorArnar 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);

Regarding nmb.ten commit: Might "if(sel.length!==0)" be better then "if(sel)"?!

Changed June 24, 2010 03:20PM UTC by DoctorArnar 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 pheiberg comment:4

Committed proposed solution to GitHub.

Changed November 30, 2010 10:47PM UTC by pheiberg comment:5

resolution: → fixed
status: newclosed

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 scottgonzalez comment:6


Changed October 18, 2012 12:27PM UTC by mikesherov comment:7

#5842 is a duplicate of this ticket.

Changed October 18, 2012 05:49PM UTC by mikesherov comment:8

#6178 is a duplicate of this ticket.