Reputation: 3025
I have used Jquery UI DatePicker for the option in my form to select the birthdate.
However, jquery gives a datepicker in <div id="datepicker"></div>
tags,
Now i am using it in my form, how can i get its value to make it work for my form processing?
Upvotes: 0
Views: 4723
Reputation: 866
if you try setting the id to an input instead of a div,
<input id="datepicker" />
does that work for you?
Upvotes: 1
Reputation: 23537
Use instead an input
field.
<input type="text" id="datepicker" name="mydate"></p>
Also you can user dateFormat
option to format the date:
$( "#datepicker" ).datepicker({
dateFormat: 'yy-mm-dd'
});
Upvotes: 1