Datepicker not appearing after adding rows to editable gridview

前端 未结 2 743
梦毁少年i
梦毁少年i 2021-01-20 21:40

I have an editable Gridview with columns as below:

    

        
2条回答
  •  盖世英雄少女心
    2021-01-20 22:08

    $(function () {

            $('.DateTimePicker').datepick({ dateFormat: 'dd MM yyyy' });
        });
    

    It means it will hit once time. Try to use forEach function Like this:

    $(function () {
            $('.DateTimePicker').each(function () {
                $(this).datepick({ dateFormat: 'dd MM yyyy' });
             });
            //$('.DateTimePicker').datepick({ dateFormat: 'dd MM yyyy' });
        });
    

提交回复
热议问题