I have two textboxes in which I have used ajax calendar extender. When I choose a date from one of the text boxes, it should automatically fill the other textbox by adding some days or months.
How can I do that?
I have two textboxes in which I have used ajax calendar extender. When I choose a date from one of the text boxes, it should automatically fill the other textbox by adding some days or months.
How can I do that?
Please follow this example and modify your code. Hope it helps.
<asp:UpdatePanel id="UpdatePanel1" runat="server">
<contenttemplate>
<cc2:CalendarPopup id="CalendarExtender1" runat="server" Width="71px" OnDateChanged="CalendarPopup1_DateChanged" AutoPostBack="True"></cc2:CalendarPopup>
<cc2:CalendarPopup id="CalendarExtender2" runat="server" Width="71px"></cc2:CalendarPopup>
</contenttemplate>
</asp:UpdatePanel>
**Code behind:**
protected void CalendarPopup1_DateChanged(object sender, EventArgs e)
{
CalendarPopup2.SelectedDate = CalendarPopup1.SelectedDate.AddDays(1); // you can add the number of days you want
}
Also the following link might give you better insight on this topic: