Setting an end date on an Infragistics WebDateChooser control
Posted on 2007-11-19
I am using an Infragistics calendar control, on an aspx web form. I need to set the calendar control so that the application user can only scroll forward three years into the future from todays date.
I could not discover a way to set this in the properties view in the designer, and so I am attempting to do this progromatically.
Here is some sample code I wrote that compiles and builds, but does not set the start and finish date. In this example I just hard coded an end date of the year 2020, and the start date from today's date.
// Using Infragistics.WebUI.WebSchedule.WebDateChooser control
protected void Page_Load(object sender, EventArgs e)
wdcStartDate.MinDate = DateTime.Now;
wdcStartDate.MaxDate = new System.DateTime(2020, 12, 31, 0, 0, 0, 0);