How do I get selected date set by jQuery UI Datepicker

Posted by Steven on Stack Overflow See other posts from Stack Overflow or by Steven
Published on 2010-06-12T14:45:42Z Indexed on 2010/06/12 14:52 UTC
Read the original article Hit count: 283

Filed under:
|

I'm setting the start date of an event using jQuery UI Datepicker.
Now I need to retrieve the date I selected.

I'm trying to use $('#startDate').datepicker('getDate'), but this returns NULL.

Using FirBug, I see that the input value is nothing>
<input type="text" name="startDate" value="" id="startDate" class="hasDatepicker">

I'm able to retrieve selected date when using jQuery serialize.

So how can I retrieve the selected date?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about datapicker