title: Javascript datepicker
body: <p>I have following javascript function </p>
  
  <pre><code>    window.onload = function(){
          new JsDatePick({
              useMode:2,
              target:"datafield",
              dateFormat:"%d-%M-%Y"
          });
      };
  
  
  &lt;input name="fromdate" type="text" id="datafield"  /&gt; 
  
  &lt;input name="todate" type="text" id="datafield"  /&gt;
  </code></pre>
  
  <p>and when i click fromdate text field datepicker shows, when i click todate text field datepicker not display due to same ID ,how it overcomes ?</p>