I'm trying to use jquery's datepicker for multiple form fields which I have working when hard coded. I don't know how to do this for a variable number of fields. For example, below I have hard coded it to work for two inputs. I want to do this for any amount of inputs the user provides on a previous page. Thanks for the help!
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="https://www.cvrc.virginia.edu/otherscripts/jquery-1.9.1.js"></script>
<script src="https://www.cvrc.virginia.edu/otherscripts/jquery-ui.js"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
$(function() {
$( "#datepicker2" ).datepicker();
});
</script>
<input type=text name=date size=10 id=datepicker>
<input type=text name=date size=10 id=datepicker2>