0

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?

0

2 Answers 2

1

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'
});
Sign up to request clarification or add additional context in comments.

Comments

1

if you try setting the id to an input instead of a div,

<input id="datepicker" />

does that work for you?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.