I see your point in there. And actually we are able to change the behavior and to throw this exceptions in the setters of the properties.
However I see another problem that will occurs in here. And I am not sure if the change will be for good or not. Here is the scenario:
By default the MaxDate
and the MinDate
So if the user dynamically want to change the possible range to 1/1/1900
. He could write:
DateTime(1950, 1, 1);
DateTime(1900, 1, 1);
And he will get an exception when setting the MaxDate
, because MinDate
is still 1/1/1980
when he try to change the MaxDate
. Which indeed could be very common scenario when if user sets values that are greater than 2099
even if he set the MinDate
DateTime(2100, 1, 1);
DateTime(2200, 1, 1);
However, if the checking is made on PreRender
the both properties will be set correctly and no exception will be thrown. So making such change could break already working code for many people.
I would ask the community here which approach is better for your? I would also appreciate If you could think of any alternatives as well.
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed