adding time jquery ui datepicker dynamically?

后端 未结 2 1368
情书的邮戳
情书的邮戳 2021-01-24 08:52

Hi I really need little help with my dynamic table \"Timesheet \". I want add datepicker to date text filed dynamically? could anyone hlep me? this code will add new row to tabl

相关标签:
2条回答
  • 2021-01-24 09:50

    Instead of using id use a class :

    HTML

    <td><input name="date1" class="date"></td>
    

    jQuery

    $(".date").datepicker();
    
    0 讨论(0)
  • 2021-01-24 09:53
    addTableRow($("table"));
    

    After you've done that.

    $("table tr").last().find('input.date-field').datepicker({...});
    //{} = datepicker settings.
    
    0 讨论(0)
提交回复
热议问题