日历选择器指示器应该是默认的

问题描述 投票:1回答:1

当我将鼠标悬停在它上面时,我得到一个指示器,但我需要设置为默认值

 <input type="date" class="form-control" name="Date" 
     [(ngModel)]="opening_date" (ngModelChange)="Operating()"
        style="width:550px" required>

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

enter image description here

请帮忙

html css3
1个回答
0
投票

您必须应用opacity:1而不是display: block属性。

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

如果要自定义日期字段或其他html5字段中的其他属性,请通过this链接。它拥有所有信息。

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity:1;
}
<input type="date" class="form-control" name="Date" style="width:550px" required>
© www.soinside.com 2019 - 2024. All rights reserved.