-
Notifications
You must be signed in to change notification settings - Fork 77
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
Bug: calcite-input-time-picker - when entering time without ':' into input box #2331
Comments
Not sure if this is a bug more so than it might be a feature request because the entered value will format correctly when the input box loses focus. Is the requirement that the colon should be added and the value format updated on every keypress in the input box? I avoided implementing it this way because I found the UX jarring while I was typing to see characters I hadn't typed being put in there. I opted to just let the user type the value and then worry about formatting the resulting value after they blurred the input, which commits the value. When the value isn't a valid time value, it reverts back to the previous valid value (which also includes no value). @jcfranco thoughts? |
The above does look like a bug. I agree w/ @eriklharper's comment about formatting while you type jarring. If we can fix the above without requiring |
I see that now. As long as the number can convert to a valid time value, I think it should add the colons in on blur. I'll update it to do just that. |
@AdelheidF : I discussed this with @jcfranco and we came up with the idea to create a new The behavior will essentially change from being a free-form text field, to established input fields that act as a mask for entering time values. |
For posterity, we backed off from option this because of the many ambiguous values it introduces. |
Is there already an issue for this |
Issue created for calcite-input-time #2709 |
Actual Behavior
When editing the time value directly inside the input box then it works well if I stick to the format and leave the ‘:’ alone. If I remove a ‘:’ though things don’t work anymore. It would be nice if it added the ‘:’ automatically back in. This is especially useful if I started with an empty input box.
Expected Behavior
it adds ':' ever second number
Reproduction Steps or Sample
123456
into the input box12:34:56
time value.Relevant Info
Version:
@esri/calcite-components@<version>
The text was updated successfully, but these errors were encountered: