描述:
在原生<input type="month" />或者<input type="date" />中,触发日期选择只能够通过输入框的最右侧图标点击触发日期选择,对于使用可能不友好。
css:
<style>
.month-check {
position: relative;//添加定位,显示右侧图标
}
//修改日期图标样式
.month-check::-webkit-calendar-picker-indicator{
position: absolute;
right: 0;
padding-left: 100%;//布满整个文本框
}
</style>
<input type="month" class="month-check" name="month">