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

ffe-datepicker-react: pressing Enter while focusing the input field with a valid date should close the calendar #14

Closed
wkillerud opened this issue Feb 26, 2018 · 0 comments
Assignees
Labels
💎 enhancement Suggested improvements to the design system

Comments

@wkillerud
Copy link
Contributor

If I edit a date in the input field with my keyboard and hit Enter I expect the calendar to close so I can tab to the next input field, given the date is valid.

@wkillerud wkillerud added the 💎 enhancement Suggested improvements to the design system label Feb 26, 2018
@wkillerud wkillerud changed the title ffe-datepicker: pressing Enter while focusing the input field with a valid date should close the calendar ffe-datepicker-react: pressing Enter while focusing the input field with a valid date should close the calendar Feb 27, 2018
@henrikhermansen henrikhermansen self-assigned this Feb 28, 2018
henrikhermansen pushed a commit that referenced this issue Feb 28, 2018
This commit makes a simple improvement to keyboard navigation of the
datepicker by allowing the calendar to be closed by pressing Enter while
the date input field has focus.

This solution is slightly different from the suggested solution. While the
suggestions solution said the calendar would only close if the date is
valid, this solution closes the calendar regardless and triggers validation.
This allows us to show an error message to the user, rather than keeping
them stuck in the calendar.

This commit also removes the `onKeyPress` listener from Input.
The reason for doing so is that the dual key listeners conflicted with the
initial changes of this commit.
I did extensive testing to assure this is a safe change to make. I am also
reassured by the fact that we don't use this listener anywhere else in our
code, while we use the `onKeyDown` listener extensively.

This fixes #14
henrikhermansen pushed a commit that referenced this issue Feb 28, 2018
This commit makes a simple improvement to keyboard navigation of the
datepicker by allowing the calendar to be closed by pressing Enter while
the date input field has focus.

This solution is slightly different from the suggested solution. While the
suggestions solution said the calendar would only close if the date is
valid, this solution closes the calendar regardless and triggers validation.
This allows us to show an error message to the user, rather than keeping
them stuck in the calendar.

This commit also removes the `onKeyPress` listener from Input.
The reason for doing so is that the dual key listeners conflicted with the
initial changes of this commit.
I did extensive testing to assure this is a safe change to make. I am also
reassured by the fact that we don't use this listener anywhere else in our
code, while we use the `onKeyDown` listener extensively.

This fixes #14
henrikhermansen pushed a commit that referenced this issue Feb 28, 2018
This commit makes a simple improvement to keyboard navigation of the
datepicker by allowing the calendar to be closed by pressing Enter while
the date input field has focus.

This solution is slightly different from the suggested solution. While the
suggestions solution said the calendar would only close if the date is
valid, this solution closes the calendar regardless and triggers validation.
This allows us to show an error message to the user, rather than keeping
them stuck in the calendar.

This commit also removes the `onKeyPress` listener from Input.
The reason for doing so is that the dual key listeners conflicted with the
initial changes of this commit.
I did extensive testing to assure this is a safe change to make. I am also
reassured by the fact that we don't use this listener anywhere else in our
code, while we use the `onKeyDown` listener extensively.

This fixes #14
kwltrs pushed a commit that referenced this issue Mar 7, 2018
This commit makes a simple improvement to keyboard navigation of the
datepicker by allowing the calendar to be closed by pressing Enter while
the date input field has focus.

This solution is slightly different from the suggested solution. While the
suggestions solution said the calendar would only close if the date is
valid, this solution closes the calendar regardless and triggers validation.
This allows us to show an error message to the user, rather than keeping
them stuck in the calendar.

This commit also removes the `onKeyPress` listener from Input.
The reason for doing so is that the dual key listeners conflicted with the
initial changes of this commit.
I did extensive testing to assure this is a safe change to make. I am also
reassured by the fact that we don't use this listener anywhere else in our
code, while we use the `onKeyDown` listener extensively.

This fixes #14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 enhancement Suggested improvements to the design system
Projects
None yet
Development

No branches or pull requests

2 participants