Opened 8 years ago

Last modified 3 years ago

#7765 open bug

Datepicker: Focus not placed back into textbox after date selection

Reported by: sooraj Owned by:
Priority: minor Milestone: none
Component: ui.datepicker Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:

Description

The focus on selecting a date using datepicker is not going back to the textbox where it is being displayed(ie. selected date), if this is done then we can trigger a search etc on enter key press. I experianced this in IE7, Os: Windows XP

Change History (15)

comment:1 Changed 7 years ago by Scott González

Type: enhancementfeature

comment:2 Changed 7 years ago by Scott González

Milestone: 1.9.01.11.0

comment:3 Changed 7 years ago by Scott González

#8668 is a duplicate of this ticket.

comment:4 Changed 7 years ago by Scott González

#8681 is a duplicate of this ticket.

comment:5 Changed 7 years ago by mikesherov

Status: newopen
Type: featurebug

comment:6 Changed 6 years ago by tj.vantoll

Summary: Focus after selecting using datepickerDatepicker: Focus not placed back into textbox after date selection

The OP mentioned individual browsers but the behavior is consistent across browsers - http://jsfiddle.net/tj_vantoll/tRdpr/.

comment:7 Changed 6 years ago by sooraj

I got one fix for this. In the js add code to set focus to the textbox on key press. Its working fine for me

comment:8 in reply to:  7 Changed 6 years ago by schettino72

Replying to sooraj:

I got one fix for this. In the js add code to set focus to the textbox on key press. Its working fine for me

sooraj please provide a patch or a pull request :)

comment:10 Changed 6 years ago by schettino72

sorry, look at this one: https://github.com/jquery/jquery-ui/pull/879

The previous one had a problem if the next input element is not in the same parent. So now it is just focus back in the input the generated the datepicker.

comment:11 Changed 6 years ago by tj.vantoll

#7266 is a duplicate of this ticket.

comment:12 Changed 5 years ago by HWinMT

All of the fixes I have seen for this bug reset the focus to the datepicker in onSelect:. This has worked for me as well. Now in IE 11 it backfires and when the focus is reset to the datepicker it shows the calendar and can be nearly impossible to close. The work around that seems to work now for me is to move the focus to the next element in the data entry form in onClose: of the datepicker. That at least maintains tab order in the form.

comment:12 Changed 5 years ago by HWinMT

All of the fixes I have seen for this bug reset the focus to the datepicker in onSelect:. This has worked for me as well. Now in IE 11 it backfires and when the focus is reset to the datepicker it shows the calendar and can be nearly impossible to close. The work around that seems to work now for me is to move the focus to the next element in the data entry form in onClose: of the datepicker. That at least maintains tab order in the form.

comment:13 Changed 5 years ago by Scott González

Milestone: 1.11.0none

comment:14 Changed 3 years ago by Scott González

#15073 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.