modus-time-picker.formatter Auto Format can be actively unhelpful
Prerequisites
- [x] I have searched for duplicate or closed issues
- [x] I have read the contributing guidelines
Describe the issue
The auto-formatter makes entering a time more difficult than a simple text box would. Typing 10: into a time picker results in 10:: which means that trying to enter 10:42 results in 10::4 (and then using arrow keys changes table focus, but that's a separate thing).
Also, autoFormatTimeInput has no tests. I have some suggested tests and my expected/preferred output
The biggest thing to fix would be 12:: to 12: and the next would be 9: to 09:
Reduced test cases
Type 10:42 into a time-picker with auto-format=true (we use a 24 hour picker) Expected 10:42 Got 10::4 (or for a 12 hour picker, 10::4 2M)
When the field is 10, it should autoformat to 10: and typing another colon should still result in 10:
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Chrome
What is the issue regarding ?
@trimble-oss/modus-web-components
What version of npm package are you using ?
v1.8.0 (also present in v1.8.1 on storybook)
Priority
Low
What product/project are you using Modus Components for ?
WorksManager
What is your team/division name ?
CCFS-CS/Weka
Are you willing to contribute ?
Yes
Are you using Modus Web Components in production ?
No response
Hello @AllanTaylor314! Thanks for opening an issue. The Modus core team will get back to you soon (usually within 24-hours) and provide guidance on how to proceed. Contributors are welcome to participate in the discussion and provide their input on how to best solve the issue, and even submit a PR if they want to.
Please wait until the issue is ready to be worked on before submitting a PR, or you can reach out to the core team if it is time bound. For trivial things, or bugs that don't change the expected behaviors and UI, you can go ahead and make a PR.
I agree that isn't annoying... I've never liked the time picker component and think it'd be better to use the OS built input="time" instead (which is what MWC v2 does).
I don't expect anyone on the core team will be able to work on addressing this issues for MWC v1 but if you need this fixed then you are welcome to open a PR. :-)