Javascript 如何在动态表中使用日期选择器选择日期?

Javascript 如何在动态表中使用日期选择器选择日期?,javascript,codeigniter,Javascript,Codeigniter,我的问题是如何在列的动态行中使用日期选择器。 我在输入文本字段中使用了日期选择器,但它只出现在日期列的第一行。 通过选择日期,则不会选择该日期 <table class="table table-bordered table-striped table-xxs" id="tb3"> <thead> <tr>

我的问题是如何在列的动态行中使用日期选择器。 我在输入文本字段中使用了日期选择器,但它只出现在日期列的第一行。 通过选择日期,则不会选择该日期

 <table class="table table-bordered table-striped table-xxs" id="tb3">
                            <thead>
                                <tr>
                                    <th></th>
                                    <th>Bank Name</th>
                                    <th>Chq No</th>
                                    <th>Chq Date</th>
                                    <th>Amount</th>
                                    <th></th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr >
                                    <td><a href='javascript:void(0);' class='remove3'><span class='glyphicon glyphicon-remove'></span></a></td>
<td>

                                    <input style="width:100px" type="text" id="Product_Code"  class="form-control input-xs Product_Code "name="name[]"></td>

                                    <td ><input style="width:100px" type="text" id="Product_Name" class="form-control input-xs" name = "no[]"   > </td>


                                    <td><input type="text" class="form-control input-xs datepicker-dates" placeholder="Pick a date&hellip;" id="TDate" name="TDate" value="<?php echo date('d/m/Y') ?>"</td>

                                    <td><input style="width:80px" type="text" id="Rate"  class="form-control input-xs" value="" name="rate[]"></td>

                                    <td><a href="javascript:void(0);" style="font-size:18px;" id="addMore3" title="Add More Person"><span class="glyphicon glyphicon-plus"></td>



                                </tr>
                            </tbody>
                        </table>

银行名称
Chq编号
Chq日期
数量
试试这个:

<input type="text"  name="TDate" class="form-control" value="" id="datepicker">     
<script type="text/javascript">
    $(function () {
        $('#datepicker').datepicker();
    });</script>

$(函数(){
$('#datepicker')。datepicker();
});

如果您不需要任何花哨的日期选择器,只需将输入类型用作日期,它在第二个日期中不可用row@Teddyid是唯一的属性。您可以使用该类在所有输入上获取日期选择器,但不为类use$('.datepicker').datepicker()选择日期;并在您的应用程序中使用datepicker插件header@PHPGeek我上课累了,但只在第一排上课
<input type="text"  name="TDate" class="form-control" value="" id="datepicker">     
<script type="text/javascript">
    $(function () {
        $('#datepicker').datepicker();
    });</script>