##Datepicker日期选择器插件
这个插件还是比较简单的,而且样式也比较漂亮,可以自定义选择年月日、年月日时分、年月、时间段选择等等。
###效果预览:
#####这个插件是基于jQuery和bootstrap的。因此我们需要引入的文件有:
bootstrap.min.css
或bootstrap.css
bootstrap-datepicker.min.css
或bootstrap-datepicker.min.css
jquery.min.js
或jquery.js
bootstrap-datepicker.min.js
或bootstrap-datepicker.js
bootstrap-datepicker.zh-CN.js
其中第五个表示将插件换成中文显示
#####具体使用方法见代码:
###html:
Datepicker日期选择器插件
<!-- 年月日时分 -->
<div class="form-group has-warning">
<label class="control-label" for="ymdhm">年月日时分
<div class="input-group">
<span class="input-group-addon glyphicon glyphicon-time"></span>
<input type="text" class="form-control" id="ymdhm" aria-describedby="inputGroupSuccess1Status">
</div>
</label>
</div>
<table class="table">
<thead>
<tr>
<th>
<div class="form-group has-error">
<label class="control-label" for="start">开始时间
<div class="input-group">
<span class="input-group-addon glyphicon glyphicon-time"></span>
<input type="text" class="form-control" id="start">
</div>
</label>
</div>
</th>
<th>
<div class="form-group has-error">
<label class="control-label" for="end">结束时间
<div class="input-group">
<span class="input-group-addon glyphicon glyphicon-time"></span>
<input type="text" class="form-control" id="end">
</div>
</label>
</div>
</th>
</tr>
</thead>
</table>
</div>
###js:
###github地址:https://github.com/usecodelee/javascript–Datepicker
###官方文档:https://bootstrap-datepicker.readthedocs.io/en/stable/
我的博客即将搬运同步至腾讯云+社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=1pk0f70ievu1e