1. 程式人生 > >bootstrap日期的漢化

bootstrap日期的漢化

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>

4.結果