搜索
您的当前位置:首页正文

解决H5 input输入框点击后弹出日期选项

来源:步旅网

参考:

实际解决方式

html

<div class="form-group">
<label for="date">参观日期日期</label>
<input type="date" class="form-control" id="date"
       placeholder="选择你有空的时间" onchange="dateAstrict(this)">
       <small id="dateHelp" class="form-text text-muted">
       <span style="color: red">*</span>请合理选择日期
       </small>
</div>

样式

    <style>
       #date{
            position: relative;
        }
        #date::-webkit-calendar-picker-indicator{
            position: absolute;
            right: 0;
            padding-left: calc(100% - 10px);
        padding-right: 10px; 
        }
    </style>

因篇幅问题不能全部显示,请点此查看更多更全内容

Top