-
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
feat(input-time-picker): add hour-format property #10997
Merged
eriklharper
merged 49 commits into
dev
from
eriklharper/4756-input-time-picker-hour-format
Jan 1, 2025
Merged
feat(input-time-picker): add hour-format property #10997
eriklharper
merged 49 commits into
dev
from
eriklharper/4756-input-time-picker-hour-format
Jan 1, 2025
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-input-time-picker-hour-format
…lharper/4756-input-time-picker-hour-format
…ranch. getMeridiemOrder needs to preserve the order of items received directly by the Intl.DateTimeFormat API.
… and was removed because connectLocalized was also calling it, but now with the useT9n controller we need it back
…o apply, which is great
…rides the corresponding style applied to popover's content div to keep time values from splitting onto 2 lines when the width is constrained.
…esolves to either 12 or 24 depending on the public hour-format property setting. Also refactoring a few places to cut down on duplicate logic when setting the input value.
…locales to use comma decimal separators.
…matOpposite utils
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.
This is going to be an awesome feature. Thanks for the review opportunity, added some doc recommendations for the new props. 🤜🏻🤛🏻
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]>
jcfranco
reviewed
Dec 30, 2024
packages/calcite-components/src/components/input-time-picker/input-time-picker.e2e.ts
Show resolved
Hide resolved
…eference cldr-json time and meridiem formats
…-zero langs. Also has the added bonus of being able to put the lang code in the test label.
… for future locale support
…lharper/4756-input-time-picker-hour-format
benelan
pushed a commit
that referenced
this pull request
Feb 8, 2025
**Related Issue:** #4756 ## Summary This PR exposes a new `hour-format` property to `input-time-picker` and `time-picker` that overrides the locale's default `hourCycle` setting, allowing a 12-hour locale to be formatted in 24-hour time and vice versa. Confirmed with the i18n team that the bulgarian `ч.` character (abbreviation for "hours") should not display for short and medium time formats. --------- Co-authored-by: Kitty Hurley <[email protected]>
Merged
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.
pr ready for visual snapshots
Adding this label will run visual snapshot testing.
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. Confirmed with the i18n team that the bulgarianч.
character (abbreviation for "hours") should not display for short and medium time formats.