2017-03-05 36 views

回答

0

日期選擇器是jQuery用戶界面,而不是jQuery的一部分不能正常工作。不知道爲什麼它適合你,但在你的代碼片段中,即使移動到<td>標籤之外,它也不起作用。

$(document).ready(function() { 
 
    $("#datepicker").datepicker(); 
 
});
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"> 
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> 
 

 
<table> 
 
    <tr> 
 
    <td width="150"> Abend Date(Cycle): <input id="datepicker" /></td> 
 
    </tr> 
 
</table>