Closed
Description
When setting start date and end date fields, the year selector will show years that are after the end date, where all selections are disabled.
These can of course just be handled by startYear and endYear manually.
const currentDate = new Date();
const eighteenYearsAgo = new Date(currentDate.getFullYear() - 18, currentDate.getMonth(), currentDate.getDate());
const longAgo = new Date(currentDate.getFullYear() - 123, currentDate.getMonth(), currentDate.getDate());
<DatePickerInput
locale="en"
label="Birthdate"
inputMode="start"
validRange={{startDate: longAgo, endDate: eighteenYearsAgo}}
/>
On that same note - the default pick will be outside of the valid range when date is supplied as undefined.