Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateInput does not support tabIndex property #3169

Closed
kittle31 opened this issue Nov 20, 2018 · 4 comments · Fixed by #3200
Closed

DateInput does not support tabIndex property #3169

kittle31 opened this issue Nov 20, 2018 · 4 comments · Fixed by #3200

Comments

@kittle31
Copy link

Environment

  • Package version(s): Core 3.9.0. datetime 3.4.0
  • Browser and OS versions: Chrome 70.0, Windows 10

Steps to reproduce

Use the following
  <DateInput value={date } placeholder={"pick a date"}
           large={true}
           onChange={ change handler }
           **inputProps={{tabIndex: 1}}**
  {...getMomentFormatter()} />
  <InputGroup value={"whatever"} 
          onChange={ change handler }
          tabIndex={2}
          />

Click in the text field, and press the tab key

Actual behavior

Cursor moves to some seemingly random control on the page

Expected behavior

Cursor moves to the date input

Possible solution

Allow inputProps to pass all property values to the tag in DateInput
-or-
update examples to show how inputProps should be used

@giladgray
Copy link
Contributor

@kittle31 can you please construct a code sandbox to demonstrate the bug? use https://codesandbox.io/s/rypm429574 as a starting point.

@giladgray
Copy link
Contributor

as far as i can tell, we've done our part in the code. inputProps is passed to the InputGroup as expected, and zIndex is not overridden.

need more information to make any progress here.

@kittle31
Copy link
Author

try this link: https://codesandbox.io/s/ov6v8rr05

If you look at the code, I pass 'tabIndex' to 3 input fields, 2 InputGroup and 1 DateInput
the tab order should be:

  1. first name (tabIndex = 1)
  2. DOB (date picker) (tabIndex = 2)
  3. last name (tabIndex = 3)
    instead the tab order is: First, Last, DOB. It seems like the tab index for date picker is being ignored.

@giladgray
Copy link
Contributor

oh snap it is definitely not emitting the tabIndex in the DateInput. nice find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants