2016-08-04 49 views
0

我想插入一個datetimepicker或只是一個在web項目中使用引導窗體的時間選擇器。只有日期選擇器正在工作。 這是我的代碼。我無法在我的springmvc項目中獲取datetimepicker

<link rel="stylesheet" \t href="//code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css"> 
 
<link rel="stylesheet" href="/resources/demos/style.css"> 
 
<script src="https://code.jquery.com/jquery-1.12.4.js"></script> 
 
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script> 
 
<script type="text/javascript"> 
 
      $(function() { 
 
       $('#datepicker').datepicker(); 
 
      }); 
 
</script>

<div class="form-group"> 
    <label for="dateDebutGlacage">DateDebutGlacage</label> 
    <f:input class="form-control" path="dateDebutGlacage" id="datepicker" type="text" placeholder="DateDebutGlacage"></f:input> 

+0

[參考此Q/A](http://stackoverflow.com/questions/2194992/jquery-is-not - 定義) – NightOwlPrgmr

回答

0

那是因爲你正在使用jQueryUI的日期選擇器這是唯一的日期,而不是時間。

你可以看一下是爲建這個jQuery插件:

http://xdsoft.net/jqplugins/datetimepicker/

+0

Okey謝謝你的幫助:)) –