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

Input should select current value on focus #32

Closed
marcoancona opened this issue Oct 6, 2018 · 3 comments
Closed

Input should select current value on focus #32

marcoancona opened this issue Oct 6, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@marcoancona
Copy link

Hi there! This looks like a great project.
I noticed a behavior that looks odd to me.
If I click on one of the time components, let's say the month, and I start typing, instead of replacing the current content with the new value it add the new value to the value that is already there (making it not valid, of course).
In the following example, I clicked between the 2 and 018 in the year field, and typed "2019". I would expect it to just replace the year instead of producing this result (see date-time picker on macOS default calendar app). This is easily achieved by selecting the all text when the user clicks in any position. Maybe this behavior can also be toggled with some setting. I would be happy to contribute for this.
screen shot 2018-10-06 at 11 04 19

@wojtekmaj wojtekmaj changed the title Avoid inserting new value on existing one Input should select current value on focus Oct 8, 2018
@wojtekmaj wojtekmaj self-assigned this Oct 8, 2018
@wojtekmaj wojtekmaj added the enhancement New feature or request label Oct 8, 2018
@wojtekmaj
Copy link
Owner

Hi,
thanks for your report. This is something that native date pickers are doing, so you're totally right it should work like that in React-DateTime-Picker.

@wojtekmaj
Copy link
Owner

Closed via recent changes in React-Date-Picker & React-Time-Picker, input providers for this package. Expect it to be fixed in the nearest release.

@marcoancona
Copy link
Author

Great, thanks!

@wojtekmaj wojtekmaj added this to the 2.0.0 milestone Oct 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants