Click here to Skip to main content
15,919,245 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
$(function () {
$("#<%= txtProcStartDate.ClientID %>").datepicker({
changeMonth: true,
changeYear: true
});

});
var prm = Sys.WebForms.PageRequestManager.getInstance();

prm.add_endRequest(function () {


$("#<%= txtProcStartDate.ClientID %>").datepicker({
changeMonth: true,
changeYear: true
});

});

});

What I have tried:

$(function () {
$("#<%= txtProcStartDate.ClientID %>").datepicker({
changeMonth: true,
changeYear: true
});

});
var prm = Sys.WebForms.PageRequestManager.getInstance();

prm.add_endRequest(function () {


$("#<%= txtProcStartDate.ClientID %>").datepicker({
changeMonth: true,
changeYear: true
});

});

});
Posted
Updated 27-Jun-16 22:39pm

1 solution

Hi,
Use This one

HTML
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js" type="text/javascript"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script>
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {
            $("[id$=txtDate]").datepicker({
                showOn: 'button',
                buttonImageOnly: true,
                buttonImage: 'http://jqueryui.com/demos/datepicker/images/calendar.gif'
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:TextBox ID="txtDate" runat="server" ReadOnly = "true"></asp:TextBox>
    <asp:Button ID="btnSubmit" runat="server" Text="Submit"
        onclick="btnSubmit_Click" />
    </form>
</body>
</html>


C#
C#
protected void btnSubmit_Click(object sender, EventArgs e)
{
    string dt = Request.Form[txtDate.UniqueID];
}

 
VB.Net

Protected Sub btnSubmit_Click(sender As Object, e As System.EventArgs)
   Dim dt As String = Request.Form(txtDate.UniqueID)
End Sub
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900