2017-03-05 24 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>