If i use this then its working.
<td ><div> Timestamp: </div><input type="text" value="" class="datepicker"/></td>
$( ".datepicker" ).datepicker();
This above code is working but this is not working
<td class="datepicker" ><div> Timestamp: </div><input type="text" value=""/></td>
$( ".datepicker input" ).datepicker();
Those are both correct. Do you have some malformed HTML elsewhere on the page? Is a JavaScript error being thrown before .datepicker() is called?
Both ok.
Try to use web develop tools and step into the code to find out the errors.
我认为您需要使用子选择器>
$(".datepicker > input").datepicker();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.