Search code examples
material-uidatepickerheight

Material-ui: Can I resize datepicker height?


I'm now woking on Material-ui datepicker and I want to make height of datepicker smaller.

enter image description here

I tried giving the "size" prop of TextField or IconButton of a datepicker as "small", but it didn't work the way I intended to. I want to resize the height like sx={{height: '35px'}}, not using the "size" prop. Can anyone help me with this problem?


Solution

  • TextField is made up of different parts. You need to select the input tag inside it.

    <TextField sx={{ "& .MuiInputBase-input": { height: "100px" } }} />
    

    See this for another example.