datetimepicker.js 兼容 bootstrap.js 3.3.7 版本时,bootstrap datetimepicker 左右箭头不显示.
第一种解决方法:
添加class=“form-control”
<input type="text" id="year" name="year" class="form-control" readonly="readonly" >
第二种方法: bootcssVer:3 ,用于对bootstrap3的支持
在js中添加
//日期
$('#year').datetimepicker({
bootcssVer:3,
format: 'yyyy',
weekStart: 1,
autoclose: true, //选中关闭
startView: 4,
minView: 4 ,
forceParse: false,
language: 'zh-CN',
todayBtn: false//今日按钮
})
第三种:
查看bootstrap-datetimepicker.js 找到icon-arrow-left和icon-arrow-right将其改为
glyphicon-arrow-left和glyphicon-arrow-right. 我这里用的版本