0

I'm trying to get the jQuery UI date picker working and failing miserably.

I've got a simple form on my page that can be seen here but no matter what I do it fails to show the date picker. There seems to be no errors thrown up. I've got this working fine on other small test sites but for some reason it's not working here ...and driving me nuts!

I've got some html:

<tr>
 <td>Select Time</td>
 <td>
   <div><input type="text" name="datepicker" id="datepicker" value="" class="hasDatepicker" />
   </div>
 </td>
</tr>

... and javascript:

   $('#datepicker').datepicker();

I really don't know what I'm doing wrong and I desperately need to get this working soon.

The end goal is to actually use Time Date Picker from here

1
  • can you please let us know if the issue is resolved. If so please accept the answer.
    – JonH
    Commented Sep 30, 2012 at 2:42

1 Answer 1

1

Try this:

$('.hasDatepicker').datepicker();

You have a class called hasDatepicker.

By the way, it is a poor idea to give the textbox the id datepicker and the name datepicker given that jquery is using datepicker(). And if it wasn't bad, its bad enough after another developer looks at your code.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.