bootstrap日期的漢化
阿新 • • 發佈:2019-02-08
1.引入js包
<script type="text/javascript" src="${link.contextPath}/js/jquery.min.js"></script> <script type="text/javascript" src="${link.contextPath}/js/bootstrap-3.3.5/js/bootstrap.min.js"></script> <script type="text/javascript" src="${link.contextPath}/js/bootstrap-3.3.5/js/bootstrap-datetimepicker.min.js"></script> <script type="text/javascript" src="${link.contextPath}/js/bootstrap-3.3.5/js/bootstrap-datetimepicker.zh-CN.js"></script>
2.html
<input type="text" id="startCheckTime" style="height:33px;">
- <input type="text" id="endCheckTime" style="height:33px;">
3.js
<script type="text/javascript"> $('#startCheckTime,#endCheckTime').datetimepicker({ language: 'zh-CN', pickDate: true, pickTime: true, useMinutes: true, useSeconds: true, useCurrent: true, minuteStepping: 1, pick12HourFormat: false }); </script>