标签:
设置datetime的格式,直接有方法重载进行,即使数据为datetime?格式
设置起始时间在配置的时候添加设置
$(‘#closeTime‘).datetimepicker({ language: ‘zh-CN‘, startDate: "2016-01-01 00:00" });
使用的是bootstrap的datetimepicker插件
<link href="@Url.StaticFile("/assets/global/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css")" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="@Url.StaticFile("/assets/global/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js")"></script>
<script type="text/javascript" src="@Url.StaticFile("/assets/global/plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js")"></script>
$(function () { $(‘#closeTime‘).datetimepicker({ language: ‘zh-CN‘, startDate: "2016-01-01 00:00" }); })
http://www.bootcss.com/p/bootstrap-datetimepicker/demo.htm
标签:
原文地址:http://www.cnblogs.com/danlis/p/5063667.html