您的位置:首页 > Web前端 > BootStrap

bootstrap中日期插件 datetimepicker 只选择年份

2016-10-27 15:05 1051 查看
html部分:
<div class="form-group"><label for="chaxun">查询时间</label><input type="text" class="form-control form-filter yearpicker" readonly name="year" id="Year" /><label for="planYear">年</label></div>
js部分:$('.yearpicker').datepicker({startView: 'decade',minView: 'decade',format: 'yyyy',maxViewMode: 2,minViewMode:2,autoclose: true});最后显示的就是如下图:
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息