-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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(DatePicker, react-datepicker-compat): Make year picker react to go to today button #28907
fix(DatePicker, react-datepicker-compat): Make year picker react to go to today button #28907
Conversation
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 cdfd573:
|
packages/react-components/react-datepicker-compat/src/components/CalendarYear/CalendarYear.tsx
Outdated
Show resolved
Hide resolved
packages/react/src/components/Calendar/CalendarYear/CalendarYear.base.tsx
Outdated
Show resolved
Hide resolved
…ar.base.tsx Co-authored-by: Makoto Morimoto <Humberto.Morimoto@microsoft.com>
…ts/CalendarYear/CalendarYear.tsx Co-authored-by: Makoto Morimoto <Humberto.Morimoto@microsoft.com>
📊 Bundle size report
🤖 This report was generated against 669c13cc90c399d2e0e727be721f868c6c6e2932 |
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
BaseButton | mount | 609 | 630 | 5000 | |
Breadcrumb | mount | 1658 | 1638 | 1000 | |
Checkbox | mount | 1671 | 1679 | 5000 | |
CheckboxBase | mount | 1503 | 1475 | 5000 | |
ChoiceGroup | mount | 2977 | 2962 | 5000 | |
ComboBox | mount | 649 | 658 | 1000 | |
CommandBar | mount | 6169 | 6203 | 1000 | |
ContextualMenu | mount | 11980 | 12015 | 1000 | |
DefaultButton | mount | 736 | 744 | 5000 | |
DetailsRow | mount | 2191 | 2163 | 5000 | |
DetailsRowFast | mount | 2141 | 2178 | 5000 | |
DetailsRowNoStyles | mount | 2003 | 2014 | 5000 | |
Dialog | mount | 2731 | 2619 | 1000 | |
DocumentCardTitle | mount | 222 | 239 | 1000 | |
Dropdown | mount | 1948 | 1964 | 5000 | |
FocusTrapZone | mount | 1106 | 1154 | 5000 | |
FocusZone | mount | 1061 | 1072 | 5000 | |
GroupedList | mount | 41093 | 41468 | 2 | |
GroupedList | virtual-rerender | 19621 | 19873 | 2 | |
GroupedList | virtual-rerender-with-unmount | 50766 | 49775 | 2 | |
GroupedListV2 | mount | 210 | 220 | 2 | |
GroupedListV2 | virtual-rerender | 209 | 202 | 2 | |
GroupedListV2 | virtual-rerender-with-unmount | 223 | 234 | 2 | |
IconButton | mount | 1092 | 1102 | 5000 | |
Label | mount | 332 | 346 | 5000 | |
Layer | mount | 2728 | 2698 | 5000 | |
Link | mount | 405 | 385 | 5000 | |
MenuButton | mount | 917 | 937 | 5000 | |
MessageBar | mount | 21345 | 21245 | 5000 | |
Nav | mount | 1990 | 1926 | 1000 | |
OverflowSet | mount | 787 | 768 | 5000 | |
Panel | mount | 2009 | 1755 | 1000 | |
Persona | mount | 728 | 739 | 1000 | |
Pivot | mount | 876 | 868 | 1000 | |
PrimaryButton | mount | 848 | 851 | 5000 | |
Rating | mount | 4536 | 4624 | 5000 | |
SearchBox | mount | 905 | 916 | 5000 | |
Shimmer | mount | 1876 | 1896 | 5000 | |
Slider | mount | 1348 | 1356 | 5000 | |
SpinButton | mount | 2856 | 2839 | 5000 | |
Spinner | mount | 387 | 399 | 5000 | |
SplitButton | mount | 1799 | 1837 | 5000 | |
Stack | mount | 406 | 407 | 5000 | |
StackWithIntrinsicChildren | mount | 856 | 877 | 5000 | |
StackWithTextChildren | mount | 2635 | 2582 | 5000 | |
SwatchColorPicker | mount | 6002 | 6161 | 5000 | |
TagPicker | mount | 1450 | 1456 | 5000 | |
Text | mount | 373 | 366 | 5000 | |
TextField | mount | 970 | 924 | 5000 | |
ThemeProvider | mount | 848 | 840 | 5000 | |
ThemeProvider | virtual-rerender | 587 | 593 | 5000 | |
ThemeProvider | virtual-rerender-with-unmount | 1271 | 1293 | 5000 | |
Toggle | mount | 633 | 602 | 5000 | |
buttonNative | mount | 196 | 190 | 5000 |
Asset size changes
Over Tolerance (1024 B) Over Baseline Below Baseline New Removed 1 kB = 1000 B Baseline commit: 669c13cc90c399d2e0e727be721f868c6c6e2932 (build) |
* master: fix(react-drawer): rename values of position prop from left/right to start/end (microsoft#28905) Breadcrumb design team fixes (microsoft#28883) applying package updates chore(react-search-preview): migrate to new slots API (microsoft#28862) docs: Updating version of CDN used and replacing usage of via.placeholder.com with SVG from CDN (microsoft#28895) fix(DatePicker, react-datepicker-compat): Make year picker react to go to today button (microsoft#28907) fix(DatePicker): readOnlyTextField styles should win over default TextField's (microsoft#28891) chore: fix lint warnings for @fluentui/react (microsoft#28888) Lint: fix fluent v9 warnings (microsoft#28889) doc: add drag & drop example (microsoft#28821)
Previous Behavior
Year picker was not updating itself when the navigated year or selected year changed. This made it so that when clicking go to today, the picker would not update to the current year.
datepicker-gototoday-doesnt-work.mp4
New Behavior
datepicker-gototoday-works.mp4
Year picker's state now takes a look at the navigated and selected date to update the current years in view accordingly.
Related Issue(s)