Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the DateTimePicker's MaxDateTime 12/31/9998 23:59:59? [closed]

Tags:

c#

winforms

http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.maxdate.aspx http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.maxdatetime.aspx

This value seems arbitrary when no explanation is provided. Why isn't this just DateTime.MaxValue?

like image 706
JSWork Avatar asked Oct 21 '11 14:10

JSWork


1 Answers

There probably isn't a business reason. I don't think it's a coincidence that the value is exactly one year prior to DateTime.MaxValue. The DateTimePicker may have some internal logic that paginates the adjacent months that breaks near DateTime.MaxValue that wasn't worth special casing.

like image 137
recursive Avatar answered Nov 06 '22 08:11

recursive