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

feat(input-time-picker): add separate hour, minute, second and meridiem input fields #11712

Draft
wants to merge 50 commits into
base: dev
Choose a base branch
from

Conversation

eriklharper
Copy link
Contributor

@eriklharper eriklharper commented Mar 7, 2025

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.

…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.
…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.
…ll having trouble re-rendering it on some changes to it
…n't include proper logic to validate fractional seconds
@github-actions github-actions bot added the enhancement Issues tied to a new feature or request. label Mar 11, 2025
…ng a getInputValue test helper function to return a concatenated "input" value. Still have some initial rendering issues with hourFormat, need to decide if a setter for the value property is going to work
…troller setting it directly. This allows the setValue method to work better without the hacky attribute access we had to do in the setter. Need to refactor setValuePart to update each time part in a non-blocking way regardless if the full value is a valid time or not.
…ately clearable. The logic is better than it was, but probably need to match native by clearing the value when the meridiem is deleted.
…ping the controller's value property the source of truth
… allow time-picker to eventually use them as well to unify the logic between the 2 components. Next up: seconds and meridiem.
… Restoring the meridiem css class so the test can select the meridiem regardless of its position
Copy link
Contributor

This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues tied to a new feature or request. Stale Issues or pull requests that have not had recent activity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant