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

Enter after manual typing will select default date #185

Open
jaqua opened this issue Dec 16, 2019 · 2 comments
Open

Enter after manual typing will select default date #185

jaqua opened this issue Dec 16, 2019 · 2 comments

Comments

@jaqua
Copy link

jaqua commented Dec 16, 2019

Some users don't use the calender selection, but they type the date manually. In that case you can see the gray background of the current date is moving while typing.
But if the user presses enter button it will select the default date value (blue border) and overwrites the typed date.

@DovahBrownies
Copy link
Contributor

Doesn't look like there's a handler for onKeyDown so the Enter isn't being handled.

You can submit a PR and add this in (shouldn't be too difficult).

I can also suggest a quick fix for this. You can add onKeyDown to your calendar component:

<DatesRangeInput onKeyDown={this.handleKeyDown} />
  handleKeyDown(ev) {
    if (ev.key === 'Enter') {
      // Do something when Enter is pressed
    }
  }

@jaqua - Does this help?

@talifa
Copy link

talifa commented May 28, 2020

Doesn't look like there's a handler for onKeyDown so the Enter isn't being handled.

You can submit a PR and add this in (shouldn't be too difficult).

I can also suggest a quick fix for this. You can add onKeyDown to your calendar component:

<DatesRangeInput onKeyDown={this.handleKeyDown} />
  handleKeyDown(ev) {
    if (ev.key === 'Enter') {
      // Do something when Enter is pressed
    }
  }

@jaqua - Does this help?

no

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

No branches or pull requests

3 participants