Dates beyond 2030 and autoscroll in select (#12998)
We got several requests to be able to set dates beyond 2030 which seems reasonable from a business standpoint! The problem was that then it required scrolling to get to the current date so a bad UX for most cases. I forced re-selecting the item to trigger auto scroll
This commit is contained in:
@ -26,7 +26,7 @@ const StyledCustomDatePickerHeader = styled.div`
|
||||
|
||||
const years = Array.from(
|
||||
{ length: 200 },
|
||||
(_, i) => new Date().getFullYear() + 5 - i,
|
||||
(_, i) => new Date().getFullYear() + 50 - i,
|
||||
).map((year) => ({ label: year.toString(), value: year }));
|
||||
|
||||
type AbsoluteDatePickerHeaderProps = {
|
||||
|
||||
@ -0,0 +1 @@
|
||||
export type SelectValue = string | number | boolean | null;
|
||||
Reference in New Issue
Block a user