Bootstrap日期和时间表单组件

项目及文档地址http://www.bootcss.com/p/bootstrap-datetimepicker/

Bootstrap日期和时间表单组件_第1张图片

 

引入css文件

<link href="${path}/static/js/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="${path}/static/css/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">

 

中间文html代码,实例中插入

 

引入js及文件


<script src="https://code.jquery.com/jquery.js">script>

<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js">script>



<script type="text/javascript" src="${path}/static/js/bootstrap-datetimepicker/bootstrap-datetimepicker.js" charset="UTF-8">script>
<script type="text/javascript" src="${path}/static/js/bootstrap-datetimepicker/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8">script>
<script type="text/javascript">
$('.form_date').datetimepicker({
language: 'zh-CN',
weekStart: 1,
todayBtn: 1,
autoclose: 1,
todayHighlight: 1,
startView: 2,
minView: 2,
forceParse: 0
});
script>

 

转载于:https://www.cnblogs.com/watermelonban/p/7687830.html

你可能感兴趣的:(Bootstrap日期和时间表单组件)