Calendar changing year
-
Hi, I am having a problem with the calendar in asp.net. Here is the situation. I have a textbox which will show the date user selected, a button to get the calendar out, the calendar itself and a drop down list which will change the year of the calendar. It works well that the drop down list is able to change the year of the calendar by: if (Calendar1.Visible == true) { DateTime dtNewDate; dtNewDate = DateTime.Parse(Convert.ToInt16(this.Calendar1.SelectedDate.Month) + "/" +Convert.ToInt16(this.Calendar1.SelectedDate.Day) + "/" + Convert.ToInt16(ddYear.SelectedItem.Text)); Calendar1.TodaysDate = dtNewDate; } The problem is when I change the month of the calendar to another month, when I onSelectedChanged on the drop down list, it doesn't change the year for me any more. I'd been wondering what was wrong. Btw, I am putting the calendar, textbox and button in the updatePanel and the drop down out side the update panel. Thanks in advance. J Liang