gpt4 book ai didi

javascript - 如何禁用特定类的日期选择器箭头

转载 作者:行者123 更新时间:2023-11-28 16:11:37 26 4
gpt4 key购买 nike

我一直在看this questionthis questionthis question他们都非常有助于摆脱 datepicker 上的小箭头,使用:

input[type="date"]::-webkit-calendar-picker-indicator { display: none; }

但是,我的一个 View 中有多个日期字段,我只想禁用具有特定类的字段的日期选择器箭头

我想做这样的事情:

input[class="buttonOnly"]::-webkit-calendar-picker-indicator { display: none; }

但是好像没有效果。我希望这是一个简单的语法问题,但我似乎找不到任何示例。像这样的事情是不受欢迎的还是我只是错过了什么?

最佳答案

使用 .class 选择器和 attribute 选择器

input[type="date"].disabled::-webkit-calendar-picker-indicator {
display: none;
}
<input type="date" class="disabled">

<input type="date">

关于javascript - 如何禁用特定类的日期选择器箭头,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38250081/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com