title: Create Jquery datepicker in dynamically generated table rows
body: <pre><code>function AddDatepicker() {                 
      $('#Ecd').datetimepicker();    
  }
  
  $(document).on("click", "#btnAdd", function () {             
  
      var $new_row = $("&lt;tr&gt;" +
          "&lt;td&gt;&lt;input type='text' id='Ecd' /&gt;&lt;/td&gt;" +
          "&lt;/tr&gt;");
  
      var $EcdTextbox = $new_row.find('text');
  
      $EcdTextbox.append(AddDatePicker()); 
  
     $("#tblWorkpack tbody").append($new_row);
  
  
  });
  </code></pre>
  
  <p>For Some reason I need to create dynamic table in the above written way only as there are other rows as well.  I need to add datepicker in dynamically generated table rows. The above function only works for the first row and fails for the following rows. Please help me with this issue. </p>