Amit Kumar

Amit Kumar

  • NA
  • 140
  • 40.8k

Ajax Calender Extender issue

Nov 29 2013 8:25 AM
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)