kk​​​​​​​bootstrap datetimepicker 日期插件超详细使用方法_杨先森的博客-CSDN博客

可参考上面的csdn或农信银行的jsp/workflow/detail.jsp



<body>
<div class="col-sm-6" style="margin-bottom: 20px;">
	<label class="input" style="position: relative; width: 471px;">
		<input type="text" id="time" class="form-control" readonly />
    </label>
</div>
</body>
<script>
//时间选择器
		$("#time").datetimepicker({
			width : '250px',
			language : 'zh-CN',//显示中文
			format : 'yyyy-mm-dd',//显示格式
			minView : "month",//设置只显示到月份
			initialDate : new Date().toLocaleDateString(),//初始化当前日期
			startDate : new Date().toLocaleDateString(),
			autoclose : true,//选中自动关闭
			todayBtn : true,//显示今日按钮
			clearBtn : true
		}).on("hide", function() {
			if (!$("#time").val()) {
				$("#time").closest(".row").find(".require").html("内容不能为空");
			} else {
				$("#time").closest(".row").find(".require").html("");
			}
		});
		</script>

更多推荐

bootStrap日期选择器