Datepicker - populatin altfield on page load (after submit)
I have a JSP form containing a datetepicker input field, and an associated altfield. It works like a charm, but after a page submit I want to keep the datepicker date populated, which means I want the altfield populated as well. This, of course, doesn't happen, and any help would be appreciated.
Here's the rough code:
<script type="text/javascript"> $(function(){ $("#datepicker").datepicker altField: '#altDate', altFormat: 'yy-mm-dd'}); </script> <form action="blah.html" method="post" id="submitForm"> <input type="text" id="datepicker" name="datepicker" value="${datepicker}"/> <input type="text" id="altDate" name="altDate"/> </form>