Tuesday, November 22, 2022

Jquery datepicker inside update panel of Grid view ajax

 If Jquery datepicker not working inside Gridview , than use

function pageLoad() {

$(function () {

                $("#txtRetirementDate").datepicker({

                    changeMonth: true,

                    changeYear: true

                });

            });

}


function pageLoad() and plcae datepicker function inside that function

reference:- https://www.codeproject.com/Questions/1123611/Datetime-picker-not-working-inside-update-panel-af


---------------------


Also we can create jquery datepickwer by below code:- 

<script>

$(function () {

                $("#txtDob").datepicker({

                    changeMonth: true,

                    changeYear: true

                });

            });

</script>

aspx page

 <asp:TextBox ID="txtDob" ClientIDMode="Static" runat="server" Text='<%# Bind("DOB") %>'></asp:TextBox>

No comments:

Post a Comment