Reputation: 31548
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();
Upvotes: 0
Views: 1136
Reputation: 850
Both ok.
Try to use web develop tools and step into the code to find out the errors.
Upvotes: 1
Reputation: 591
I think you need to use the child selector >
$(".datepicker > input").datepicker();
Upvotes: 0
Reputation: 1028
Those are both correct. Do you have some malformed HTML elsewhere on the page? Is a JavaScript error being thrown before .datepicker() is called?
Upvotes: 2
Reputation: 40507
try using following selector:
$("td.datepicker input:text").datepicker();
Working example is here
Upvotes: 0