-
Notifications
You must be signed in to change notification settings - Fork 76
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 hour-format property #10059
Open
eriklharper
wants to merge
58
commits into
dev
Choose a base branch
from
eriklharper/4756-time-picker-24-hour-support
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,411
−898
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…lharper/4756-time-picker-24-hour-support
… value of 0:0:0 resulted in a clearing of the value
… where we need to set the localized input value. Also fixed a place where localized meridiem wasn't being set properly.
…we can determine hourcycle from just the locale. Refactored input-time-picker to match time-picker in how it updates locale state when it changes, including setting a default hourCycle when one is not provided.
…rd to something better
… on hourCycle. Not perfectly working, but we'll need this to get to the next step which is to parse both 12 and 24 hour formats. Fixing Arabic locale time format overrides to match ICU.
…e working regardless of hourCycle!
…ater in the e2e typing tests
…alue to nil. Also adding comprehensive locale typing tests, need to expand a bit more and fix a few locales still
…ult locales by correcting the regex to capture whitespace characters on either side of the meridiem tokens in the time format string
…l supported locales to test that render meridiem to the left of the time value
…t seem to like a lot of the localized meridiem formats, so we may want to ship this with the caveat that it might not work just right for all locales
…er key and committing on blur using selectText util
… localized am and pm by removing the space, negating the need to consider the meridiem order.
…and other elements in the format token replacement logic
…g in the e2e test environment, so need to figure out how to workaround this
…ken, so need to fix that up next
…preserve the order coming back from Intl.DateTimeFormat
… test environment is formatting as if it was es, refactoring demo page to work in Firefox and Safari
….com:Esri/calcite-design-system into eriklharper/4756-time-picker-24-hour-support
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.
Awesome! Have a few doc considerations below 📚
packages/calcite-components/src/components/input-time-picker/input-time-picker.tsx
Outdated
Show resolved
Hide resolved
packages/calcite-components/src/components/time-picker/time-picker.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Kitty Hurley <[email protected]>
Co-authored-by: Kitty Hurley <[email protected]>
…xes a broken test in time-picker.
….com:Esri/calcite-design-system into eriklharper/4756-time-picker-24-hour-support
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
bot
added
the
Stale
Issues or pull requests that have not had recent activity.
label
Sep 29, 2024
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue: #4756
Summary
This PR exposes a new
hour-format
property toinput-time-picker
andtime-picker
that overrides the locale's defaulthourCycle
setting, allowing a 12-hour locale to be formatted in 24-hour time and vice versa.