title: Datepicker for input elements created using for loop
body: <p>I want to add Jquery date picker to input elements created from for loop in PHP.</p>
  
  <p>Say i use 'for' loop and generate 5 input elements:</p>
  
  <pre><code> for($i=0;$i&lt;=5;$i++)
   {
    echo '&lt;input class="datepicker_input"/&gt;';
   }
  </code></pre>
  
  <p>Now if i try attaching JQuery date picker</p>
  
  <pre><code> $(window).load(function(){
      $(".datepicker_input").datepicker();
   });
  </code></pre>
  
  <p>This makes datepicker option to displayed to all elements generated, but when I select the second input and change date, the first input gets changed and the event is not binded to other input elements.</p>
  
  <p>How can we make date picker option to be applicable to all input elements..</p>