我使用http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.js
这是我的代码:
<script type="text/javascript">
$(document).ready(function(){
$('#time').datetimepicker({ showSecond: false,dateFormat: 'yy-mm-dd',timeFormat: 'hh:mm',minDate: new Date() });
});
</script>
.......
<p><label for="id_time">Date:</label> <input type="text" name="time" id="time" /></p>
.......
如何减少时间(从早上9点到下午5点)?
答案 0 :(得分:1)
http://trentrichardson.com/examples/timepicker/#rest_examples
$('#time').timepicker({
ampm: true,
hourMin: 9,
hourMax: 17
});