This is close to what brought me to the forum this time. Here's the full error:
Value of '10/12/2012 12:00:00 AM' is not valid for
'SelectedDate'. 'SelectedDate' should be between 'MinDate' and 'MaxDate'.
Parameter name: SelectedDate
As Princy said, the problem is that the data coming from the database is not within the Min/Max set for the control. Yes, I do need to establish a min/max so that users don't pick a date outside of a reasonable scope. But if the date on the server is already beyond that scope, I don't want to throw an exception, I'd rather reset the Min or Max to whatever the server data says.
So I'm thinking the protocol would be to set min/max to something Way out of range, then when the data is loading get the actual min/max values, then in Page_Render ( or a DataBound event? ) reset the min/max to the new default.
1) Can someone help with that?
and/or 2) Does anyone see that as being a seriously wrong thing to do? Sure, I can log discrepancies - I just don't want the the browser to halt mid-update (which is what this exception is causing) if the app allows different data values.