css - 更改文本字段 onFocus mui 的背景颜色
问题描述
========================================
当日历打开但无法找出方法时,我正在尝试更改输入类型日期的背景颜色。这是代码
dateInputRoot: {
'&:hover': {
backgroundColor: '#EBEBEB',
},
'&:active': {
backgroundColor: '#fff',
borderColor: '#2EFF22',
borderWidth: 1,
},
},
dateInput: {
border: 0,
},
<TextField
margin="dense"
type="date"
variant="outlined"
value={closeDate}
placeholder=""
fullWidth
style={{ paddingLeft: 0 }}
onChange={(e) => {
setCloseDate(e.target.value);
}}
className={classes.dateInputRoot}
InputProps={{
classes: { notchedOutline: classes.dateInput },
}}
/>
问题在于活动选择器它只会改变背景,直到我按下鼠标按钮也没有应用borderWidth。我想在日历打开时为白色和一些边框提供背景。请提供任何帮助
解决方案
推荐阅读
- c++ - 如何在 Visual Studio 代码的调试中运行 C++ 脚本?
- java - 奇怪的桶排序基准结果?
- amazon-web-services - 如何通过快照减小 EBS 卷大小
- ssl - 没有发夹 nat 的 kubernetes 上的证书管理器
- python - 列值四舍五入的问题
- javascript - 如何修复 React 中页面加载时的 FontAwesome 图标很大
- amazon-web-services - 无法通过 AWS SDK 确认用户注册
- jenkins - 使用 Jenkins 部署到 ec2 实例的步骤
- php - 在 laravel 和 Visual Studio 代码中是否有解决我的问题的方法
- javascript - 序列化 Laravel 刀片阵列