-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fix(TimePicker): Selection now works in locales that don't use "am"/"pm" in their time format #28469
fix(TimePicker): Selection now works in locales that don't use "am"/"pm" in their time format #28469
Conversation
…pm" in their time format
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit edd5609:
|
📊 Bundle size report🤖 This report was generated against e3a0d071997ee796ba7d0931b6d3a5a341fb3921 |
🕵 fluentuiv8 No visual regressions between this PR and main |
Asset size changes
Over Tolerance (1024 B) Over Baseline Below Baseline New Removed 1 kB = 1000 B Baseline commit: e3a0d071997ee796ba7d0931b6d3a5a341fb3921 (build) |
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
BaseButton | mount | 613 | 612 | 5000 | |
Breadcrumb | mount | 1679 | 1686 | 1000 | |
Checkbox | mount | 1642 | 1695 | 5000 | |
CheckboxBase | mount | 1438 | 1480 | 5000 | |
ChoiceGroup | mount | 2883 | 2859 | 5000 | |
ComboBox | mount | 646 | 642 | 1000 | |
CommandBar | mount | 6064 | 6146 | 1000 | |
ContextualMenu | mount | 12775 | 11762 | 1000 | |
DefaultButton | mount | 751 | 744 | 5000 | |
DetailsRow | mount | 2140 | 2163 | 5000 | |
DetailsRowFast | mount | 2147 | 2174 | 5000 | |
DetailsRowNoStyles | mount | 2055 | 1986 | 5000 | |
Dialog | mount | 2613 | 2630 | 1000 | |
DocumentCardTitle | mount | 233 | 225 | 1000 | |
Dropdown | mount | 2034 | 1965 | 5000 | |
FocusTrapZone | mount | undefined | err | 5000 | |
FocusZone | mount | 1077 | 1046 | 5000 | |
GroupedList | mount | 41455 | 41303 | 2 | |
GroupedList | virtual-rerender | 19723 | 19816 | 2 | |
GroupedList | virtual-rerender-with-unmount | 50136 | 50353 | 2 | |
GroupedListV2 | mount | 220 | 225 | 2 | |
GroupedListV2 | virtual-rerender | 216 | 212 | 2 | |
GroupedListV2 | virtual-rerender-with-unmount | 220 | 227 | 2 | |
IconButton | mount | 1083 | 1080 | 5000 | |
Label | mount | 330 | 335 | 5000 | |
Layer | mount | 2718 | 2735 | 5000 | |
Link | mount | 389 | 387 | 5000 | |
MenuButton | mount | 933 | 942 | 5000 | |
MessageBar | mount | 21676 | 21675 | 5000 | |
Nav | mount | 1907 | 1920 | 1000 | |
OverflowSet | mount | 782 | 788 | 5000 | |
Panel | mount | 1751 | 1781 | 1000 | |
Persona | mount | 744 | 762 | 1000 | |
Pivot | mount | 863 | 872 | 1000 | |
PrimaryButton | mount | 851 | 823 | 5000 | |
Rating | mount | 4504 | 4598 | 5000 | |
SearchBox | mount | 903 | 868 | 5000 | |
Shimmer | mount | 1780 | 1826 | 5000 | |
Slider | mount | 1306 | 1302 | 5000 | |
SpinButton | mount | 2778 | 2803 | 5000 | |
Spinner | mount | 371 | 386 | 5000 | |
SplitButton | mount | 1792 | 1825 | 5000 | |
Stack | mount | 408 | 402 | 5000 | |
StackWithIntrinsicChildren | mount | 855 | 847 | 5000 | |
StackWithTextChildren | mount | 2637 | 2629 | 5000 | |
SwatchColorPicker | mount | 6024 | 6044 | 5000 | |
TagPicker | mount | 1432 | 1413 | 5000 | |
Text | mount | 382 | 363 | 5000 | |
TextField | mount | 897 | 939 | 5000 | |
ThemeProvider | mount | 818 | 814 | 5000 | |
ThemeProvider | virtual-rerender | 587 | 580 | 5000 | |
ThemeProvider | virtual-rerender-with-unmount | 1286 | 1273 | 5000 | |
Toggle | mount | 588 | 635 | 5000 | |
buttonNative | mount | 192 | 190 | 5000 |
* master: chore(cxe-prg): migrate to new slot API (microsoft#28752) chore(teams-prg): migrate to new slot API (microsoft#28751) chore: re-export slot and assertSlots methods (microsoft#28755) Docs(react-tree): Improve docs and stories (microsoft#28741) feat: implements nested tree selection (microsoft#28668) applying package updates applying package updates feature(react-utilities): implements new slot methods (`slot` and `assertSlots`) (microsoft#28373) fix(TimePicker): Selection now works in locales that don't use "am"/"pm" in their time format (microsoft#28469) bugfix: ensures controlled state works properly + (microsoft#28665) feat(tokens): Add status color tokens (microsoft#28006) feat(tokens): Add colorBrandStroke2Contrast and colorNeutralStrokeAlpha2 (microsoft#28638) Made BreadcrumbButton consistent with Item and Link (microsoft#28672)
* master: chore(cxe-prg): migrate to new slot API (microsoft#28752) chore(teams-prg): migrate to new slot API (microsoft#28751) chore: re-export slot and assertSlots methods (microsoft#28755) Docs(react-tree): Improve docs and stories (microsoft#28741) feat: implements nested tree selection (microsoft#28668) applying package updates applying package updates feature(react-utilities): implements new slot methods (`slot` and `assertSlots`) (microsoft#28373) fix(TimePicker): Selection now works in locales that don't use "am"/"pm" in their time format (microsoft#28469) bugfix: ensures controlled state works properly + (microsoft#28665) feat(tokens): Add status color tokens (microsoft#28006) feat(tokens): Add colorBrandStroke2Contrast and colorNeutralStrokeAlpha2 (microsoft#28638) Made BreadcrumbButton consistent with Item and Link (microsoft#28672) fix(EventListener): do not use `defaultProps` (microsoft#28725)
Previous Behavior
TimePicker selection does not work when using a locale that doesn't use the characters "am"/"pm" in the time format, such as Japanese. This happens because the TimePicker is attempting to parse the locale-formatted time string of the new value when the selection changes, using a parsing function that is not locale-aware.
New Behavior
Save the Date object in each of the ComboBox items used by TimePicker. When a new selection is made, use the Date object itself, rather than parsing the formatted time string.
Related Issue(s)