-
Notifications
You must be signed in to change notification settings - Fork 79
feat(input-time-picker): add separate hour, minute, second and meridiem input fields #11712
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
Conversation
…or meridiem order after adding the proper rendering order logic for meridiem. Also fixing background color css variable assignment to work with both light and dark modes
…inputs because of issue #3883 and adding meridiem ordering logic, although it doesn't currently work with arabic, so we'll fix that in a follow-up
… for RTL meridiems. This allows the Tab key to go in sequence properly. Need to fix this to match in time-picker too.
…ate localizeTimeStringToParts, updated tests. Refactoring to set the localized input value in willUpdate when the value changes. This will ensure that only the last change to value will relocalize the input value because Lit batches updates to properties in willUpdate.
…nd do some more clean-up
…der ring to match input-text styling, removing unused internal css variables that applied to input-text and getting the toggle icon working to open and close the popover
…g a step argument to toISOTimeString which will force the returned time value to conform to the provided step.
…ction that can be used by parseTimeString and toISOTimeString
…e meridiem setting somehow and there's still a lot of cleanup to do, but this is great progress.
…ding a component.requestUpdate to get the component to re-render when time properties change in the controller.
… removing toISOTimeStringFromParts in favor of just toISOTimeString
…ctored toISOTimeString and isValidTime to accept Time objects with expanded and improved unit tests.
…esses to move from 000 to 001
…ll having trouble re-rendering it on some changes to it
…n't include proper logic to validate fractional seconds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good from the design side!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff, @eriklharper! The only thing I'd like addressed before merging is for the input to emit change events on blur and commit to preserve the expected behavior of emitting when users type and finalize a value.
Per our conversation, please create a high-priority follow-up issue to address suggested refactors.
👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈
👈🕐🕐🕐🕐👈🕐👈👈👈👈👈🕐👈🕐🕐🕐🕐👈👈🕐🕐🕐👈👈🕐🕐👈👈🕐👈👈👈🕐👈🕐🕐🕐🕐👈🕐👈
👈🕐👈👈🕐👈🕐👈👈👈👈👈🕐👈🕐👈👈👈👈🕐👈👈👈👈🕐👈👈🕐👈🕐🕐👈🕐🕐👈🕐👈👈👈👈🕐👈
👈🕐🕐🕐🕐👈🕐👈👈🕐👈👈🕐👈🕐🕐🕐👈👈👈🕐🕐👈👈🕐👈👈🕐👈🕐👈🕐👈🕐👈🕐🕐🕐👈👈🕐👈
👈🕐👈👈🕐👈🕐👈🕐👈🕐👈🕐👈🕐👈👈👈👈👈👈👈🕐👈🕐👈👈🕐👈🕐👈👈👈🕐👈🕐👈👈👈👈👈👈
👈🕐👈👈🕐👈👈🕐👈👈👈🕐👈👈🕐🕐🕐🕐👈🕐🕐🕐👈👈👈🕐🕐👈👈🕐👈👈👈🕐👈🕐🕐🕐🕐👈🕐👈
👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈
packages/calcite-components/src/components/input-time-picker/input-time-picker.tsx
Outdated
Show resolved
Hide resolved
packages/calcite-components/src/components/input-time-picker/input-time-picker.e2e.ts
Outdated
Show resolved
Hide resolved
…in the component, removed unused ref on the time-picker element.
…comments (#12108) **Related Issue:** #12090 ## Summary Addresses refactor changes originally requested in #11712. - Drops the `localized` prefix from the `LocalizedTime` interface. - Refactors `isValidTime()` util function to use more readable internal variable names. - Unifies the return and reduces duplication in the `toISOTimeString()` util function. - Converting an `if/else` to a ternary in stacked focus trap test
…comments (#12108) **Related Issue:** #12090 ## Summary Addresses refactor changes originally requested in #11712. - Drops the `localized` prefix from the `LocalizedTime` interface. - Refactors `isValidTime()` util function to use more readable internal variable names. - Unifies the return and reduces duplication in the `toISOTimeString()` util function. - Converting an `if/else` to a ternary in stacked focus trap test
Related Issue: #2709
Summary
This PR adds separate focusable and editable input fields for each portion of the time value in
calcite-input-time-picker
.