我将 controlType 设置为'select'
,并将 minDateTime 设置"2015/03/04 20:15"
为#datetimepicker
,当我单击它时,对于一天中的每个小时不能选择小于 15 的分钟数。
jQuery datetimepicker 选项 minDateTime 错误?还是我的方式不对?
$("#datetimepicker").datetimepicker({
minDateTime: new Date("2015/03/04 20:15"),
controlType: 'select'
});
/* css for timepicker */
.ui-timepicker-div .ui-widget-header {
margin-bottom: 8px;
}
.ui-timepicker-div dl {
text-align: left;
}
.ui-timepicker-div dl dt {
float: left;
clear: left;
padding: 0 0 0 5px;
}
.ui-timepicker-div dl dd {
margin: 0 10px 10px 45%;
}
.ui-timepicker-div td {
font-size: 90%;
}
.ui-tpicker-grid-label {
background: none;
border: none;
margin: 0;
padding: 0;
}
.ui-timepicker-rtl {
direction: rtl;
}
.ui-timepicker-rtl dl {
text-align: right;
padding: 0 5px 0 0;
}
.ui-timepicker-rtl dl dt {
float: right;
clear: right;
}
.ui-timepicker-rtl dl dd {
margin: 0 45% 10px 10px;
}
<script src="http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<link href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" rel="stylesheet" /> Date: <input type="text" id="datetimepicker" />