I am having trouble getting my datepicker to popup on an image click and sending the selected input to my text entry field. Basically, when the user clicks on the calender image, the datepicker popup should appear, they choose an input, and it appears in the text input. Also, I need the text input to show the proper date on the calender if they input a date then check the calender. Here is my input and image section.
<p>Date: <input type="text" class="screening_01" id="screening_01" maxlength="10" size="10" value="<%=session.getAttribute("screening_01")==null?"":session.getAttribute("screening_01")%>" /></p>
<div id="calender"><img src="/images/calendar.png" /></div>
This is a working datepicker, but it only works if I click the text input itslef.
$(function() {
$( "#screening_01" ).datepicker();
});
Now I need it to popup when I click the calender image or div, maybe something like this? (not working of course)
$("#calender").click(function() {
$("#datepicker").show();
});