1.地址引用
<script src="~/Content/plugins/BootstrapDate/js/bootstrap-datetimepicker.js"></script>
<script src="~/Content/plugins/BootstrapDate/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<link href="~/Content/plugins/BootstrapDate/css/bootstrap-datetimepicker.css" rel="stylesheet" />
2.关键代码
<div class="col-sm-3"> <div class="input-group date"> <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div> <input type="text" class="form-control datepicker_month" name="starttime"> </div> <!-- /.input group --> </div>
$('.datepicker_month').datetimepicker({ format: 'yyyy-mm-dd', autoclose: true, minView: 2, //开始页 language: 'zh-CN' //汉化 });
3.效果
相关资料
http://www.bootcss.com/p/bootstrap-datetimepicker/