1
Vote

Date fields with Range Filter has no initial value, and fails if left empty

description

I added a [Filter(FilterMode=FilterControlMode.Range)] to a date column in a class with many other filters.
 
By default the filter renders without any value selected in either From or To date, which is good.
 
I then tried to filter by one of the other filters (a String contains filter), and got the following error:

 

SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 

Exception Details: System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

 
It would be nice if the Date Range Filter could accept both 0, 1 and 2 inputs (no values, just start value, just end value and both).

comments

Soraz wrote Oct 16, 2008 at 7:15 PM

D'oh, just realized I could simply change that behaviour at will with the FilterTemplates.

Closing bug (if i can).

Soraz wrote Oct 16, 2008 at 7:16 PM

Aparently I can't close the issue myself. Sorry to waste your time.

wrote Feb 14, 2013 at 3:41 AM