JQuery Calaner
<link rel=”stylesheet” href=”http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css” />
<script src=”http://code.jquery.com/jquery-1.9.1.js”></script>
<script src=”http://code.jquery.com/ui/1.10.3/jquery-ui.js”></script>
<link rel=”stylesheet” href=”/resources/demos/style.css” />
<script>
$(function () {
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(function (evt, args) {
$(“#ctl00_ContentPlaceHolder1_pspSalePrice_txtstDate”).datepicker({ minDate: 0 });
});
});
</script>
<asp:UpdatePanel ID=”UpdatePanel25″ runat=”server” UpdateMode=”Conditional” RenderMode=”Inline”>
<ContentTemplate>
<table>
<tr id=”trDate” runat=”server” height=”10″>
<td >
</td>
<td align=”right”>
<asp:Label ID=”lblDate” runat=”server” Text=”Start Date” CssClass=”Label”></asp:Label>
</td>
<td align=”left”>
<asp:TextBox ID=”txtstDate” runat=”server” MaxLength=”10″ ></asp:TextBox>
<asp:RequiredFieldValidator ID=”rfvDate” runat=”server”
ControlToValidate=”txtstDate” ErrorMessage=”Please enter a Date.”
ToolTip=”Please enter a Date.” ValidationGroup=”AddEditPromotionalSalePrices” Enabled=”true” >*</asp:RequiredFieldValidator>
</td>
<td >
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
Solution:
i face this issue when i create usercontrol and use on Webpage.
with Above code Jquery Calander on woriking first time after postback calander not working . so fine solution of this problem just change in header section jquery code replace with below mention code.
<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(function(evt, args) {
$(".datepicker").datepicker();
});
</script>