Bootstrap日期和时间表单组件
项目及文档地址http://www.bootcss.com/p/bootstrap-datetimepicker/
引入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及文件 <!-- jQuery (Bootstrap 的 JavaScript 插件需要引入 jQuery) --> <script src="https://code.jquery.com/jquery.js"></script> <!-- 最新的 Bootstrap 核心 JavaScript 文件 --> <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>