Default Year Value for MUI X datepicker

68 Views Asked by At

I have a request for one of my projects for my client to have a default year selected for the datepicker in MUI X. Is it possible to have the datepicker to default to lets say 2023/MM/DD where they can change the year but its by default selected to 2023. My clients task revolves around inputing many data and one of the ways to efficiently speed their task up is by having this datefield defaulted to 2023 since most of the data they enter uses 2023 but with different Months and days. Is there a way to do this or maybe an alternative?

I looked it up and couldn't find a solution. The only way i could think of just to have the dates to be the current day but it could introduce other problems like data discrepancy

1

There are 1 best solutions below

1
On
export default function ResponsiveDatePickers() {
   const default_date = dayjs('2023'); // 1-1-2023
   <DesktopDatePicker defaultValue={date} />
}