2
Reply

Ajax Calender Extender issue

Ask a question
Amit Kumar

Amit Kumar

10y
1k
1
i have textbox in which i want to store the selected date of calender. for this purpose i have used ajax calender extender. and set the target control property to textbox id. but when i click on button of same page then i lost the seleted date (i mean i lost the textvalue) but i want  the selected date after clicking on button.. my code is as.

<td>
     <asp:TextBox ID="txtDate" runat="server" ReadOnly="true"></asp:TextBox>
</td>
 <td>
     <asp:ImageButton ID="imgCalender" runat="server" ImageUrl="~/Images/Calendar.png" ToolTip="Select a Date" />
   <asp:CalendarExtender ID="calShow"  runat="server" PopupButtonID="imgCalender" PopupPosition="BottomLeft" TargetControlID="txtDate" OnClientDateSelectionChanged="CheckForPastDate"></asp:CalendarExtender>
  </td>
and also i want when user try to select a date which is greater than the current date+20 days then text box should be empty. means user have to select again a proper date.


Answers (2)