CatherineKim
CatherineKim

Reputation: 119

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?

Upvotes: 0

Views: 742

Answers (1)

Hamed Siaban
Hamed Siaban

Reputation: 1682

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.

Upvotes: 1

Related Questions