-
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
base: dev
Are you sure you want to change the base?
Conversation
…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]>
…each locale's meridiem formats
This looks like a duplicate PR, should #10059 be closed? |
I'll close that one once this guy is merged. That original PR was in Stencil/pre-Lumina, so I reauthored the PR on the latest lumina, but wanted to preserve the original comments until they all resolved. |
…meridiem was getting replaced with a comma
…h is constrained.
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.