I am trying to use the DatePicker component from MUI to choose my date. So far I have accomplished the following,
<DatePicker
name="goalDateDatePicker"
minDate={dayjs(new Date()).add(1, 'days')}
// @ts-ignore - Remove the null type check as we will never receive it.
onChange={(v: Dayjs | null) => null}
slotProps={{
textField: {
InputProps: {
placeholder:"",
value: null,
startAdornment: (
<IconButton style={{ padding: 0 }}>
{ null }
</IconButton>
),
},
},
}}
/>
Unfortunately, although the input is now blank, I cannot find a way to remove the input option entirely and also the border. I simply want to select the calender icon to choose a date so that I can use the date elsewhere.
I am using slotProps as per the reccomendation and I have also read the customization section but I cannot find an example that suits only presenting the calender icon and making it clickable to select a date.