Hi,
In my application, I have used two textbox and two calendar. here first textbox accept selected date from first calendar1. after this a user can select date from calendar2 for textbox2. I want that second calendar show only those dates, which comes after 20 year from selected date in first textbox (or calendar1). what will be the code. plz, help me.
Thanks, in advance
How to show specified dates in calendar conttol
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Mamta MRank #268 · 9.4K reputationPosted Sep 13, 2011, 3:46 AM EDT
You will need the following code to achieve this:
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
DateTime dt = Calendar1.SelectedDate;
Calendar2.VisibleDate = dt.AddYears(20);
}
Hope that helps.
-Mamta