2

目前我正在使用 DatePicker(查看源:http://jqueryui.com/demos/datepicker/default.html),但我在添加 Timepicker 插件时遇到了困难(https://github.com/trentrichardson/jQuery -Timepicker-Addon),如何正确使用插件?

谢谢 :)

4

1 回答 1

5
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>  
<!-- core, slider, datepicker -->  
<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>  
<script type="text/javascript" src="js/timepicker.js"></script>  

<script type="text/javascript">  
$(function() {  
    $('#datetime').datetimepicker({  
      showSecond: true,
      timeFormat: 'hh:mm:ss',
      stepHour: 2,
      stepMinute: 10,
      stepSecond: 10
      ...  
     });  
});  
</script>  

<input type="text" name="datetime" id="datetime" value=""> 

在此处阅读其文档:http:
//trentrichardson.com/examples/timepicker/

于 2012-04-12T04:03:28.383 回答