UltraDateTimeEditor and MaxDate
New DiscussionCan anyone explain why although the MaxDate property is a DateTime you cannot set it to DateTime.MaxValue.
i.e. myDateEditor.MaxDate = DateTime.MaxValue; causes an exception.
I had a look with reflector, on the set of the property a comparation is made to a private static variable called "defaultMaxDate", if the value is greater than defaultMaxDate the out of range exception is thrown. It appears the value of defaultMaxDate is 31/12/998 (DateTime.MaxValue is 31/12/999).
Im just a bit confused as to what purpose this serves ?
Thanks
Sign In
to post a reply
Replies
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Favorites
0 Replies
4 Created On
May 27, 2010 Last Post
16 years, 4 months ago