<Paper elevation={0}>
<DatePicker
fullWidth
views={['year', 'month', 'day']}
openTo='month'
value={initialDate}
slotProps={{ textField: { sx: { height: '10px' } } }}
onChange={(newValue) => handleInitialDateChange(newValue)}
/>
</Paper>
I have the above code. For some reason the height property I passed via sx via textField via slotProps is only affecting the Paper component.
Any help is appreciated.
With your solution the placeholder is not well placed.
It's better to use this one:
<DatePicker
slotProps={{ textField: { size: 'small' } }}
/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With