title: JQuery datepicker function for multiple from inputs
body: <p>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!     </p>
  
  <pre><code> &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"&gt;
        &lt;script src="https://www.cvrc.virginia.edu/otherscripts/jquery-1.9.1.js"&gt;&lt;/script&gt;
        &lt;script src="https://www.cvrc.virginia.edu/otherscripts/jquery-ui.js"&gt;&lt;/script&gt;
        &lt;script&gt;
        $(function() {
          $( "#datepicker" ).datepicker();
        });
        $(function() {
          $( "#datepicker2" ).datepicker();
        });
        &lt;/script&gt;
  
        &lt;input type=text name=date size=10 id=datepicker&gt;
        &lt;input type=text name=date size=10 id=datepicker2&gt;
  </code></pre>