Hello All,
Admin/Modules/modulesettings.ascx.cs has a logical bug that is going to cause people problems and is in fact a disaster waiting to happen for users that ever set startdate / enddate in module settings.
The problem:
As mentioned in this thread:
http://www.dotnetnuke.com/Resources/F...
exceptions will occur if anything results in StartDate or EndDate columns of Modules table ever getting set to any date outside the date range 01/01/1980 <--> 12/31/2099. This is because the module settings control is using the DnnDatePicker (exposing Telrik DatePicker), and the default range of the Telerik DatePicker is the range I just showed. So invoking the settings on a module with either date in the DB outside the range results in an exception.
But wait, it will get worse:
modulesettings.ascx.cs OnLoad() function contains:
startDatePicker.MinDate = DateTime.Now;
endDatePicker.MinDate = DateTime.Now;
so you edit the module settings and set the startdate to today and the enddate to next week, everything okay, (until tomorrow).
Now tomorrow comes and you need to change module permissions or something so you invoke module settings. Module startdate will now be YESTERDAY and outside valid range and exception will be thrown.
The above 2 lines should be replaced with:
startDatePicker.MinDate = DateTime.MinValue;
startDatePicker.MinDate = DateTime.MaxValue;
endDatePicker.MinDate = DateTime.MinValue;
endDatePicker.MinDate = DateTime.MaxValue;
This insures that the module settings will be able to be invoked at anytime in the future, and furthermore insures that the date range conforms to the .NET System.DateTime struct date range instead of Telerik's chosen default.
I am certainly glad the source to this control was included in the DNN distribution as I would have been going INSANE if I could not debug this.
I do want to say to all the DNN core staff and helpers THANKS, and I do think DNN 6 IS a GREAT Product, GOOD JOB! - but do please fix this asap