我使用的是 type='date' 的material-ui textfied,当它没有动画时它与日期标签混合。我想解决这个问题,我希望它不要像下面的图片那样动画并固定在顶部


成分:
<TextField
className={classes.inputFields}
error={errors.lastVisit && touched.lastVisit}
name='lastVisit' variant='standard'
type='date'
onChange={handleChange}
id='lastVisit'
label='Last Visit'
helperText={errors.lastVisit && touched.lastVisit? errors.lastVisit
: null}
/>
Run Code Online (Sandbox Code Playgroud)
使用material-ui的makeStyles函数应用的CSS和CSS是:
inputFields: {
width: '100%',
'& .MuiInputLabel-animated': {
color: 'black',
[theme.breakpoints.down('md')]: {
fontSize: theme.spacing(2),
}
},
}
Run Code Online (Sandbox Code Playgroud)
如何解决这个问题?