I am trying open a calendar with datepicker on button click, and have the date go into the sibling text box when chosen. I need to be able to do this for two different text boxes.
Here is what I have so far.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to load the jQuery UI with that jsfiddle. Try the following:
And your JS:
Things to note: you don’t need to add the button, the datepicker will do that for you – you’ll need to add a link to a button image. If you don’t like this then you could just remove the bottonImage reference.
All of this has been taken from the jQuery datepicker UI documentation here
EDIT:
Fixed up closing tags for html elements, fixed in jsfiddle here