Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1140
UltraDateTimeEditor control...
posted

I'm running into a problem when I try to assign a System.DateTime object to the UltraDateTimeEditor control...  Specifically, it's crying about the fact that the system date is 1/1/0001 which apparently is less than the minimum value supported by the control. 

My first question is, WHO would create a control that wouldn't accept the Minimum value of a date as defined by the .net system that the control was designed to be used with?  To say that that's stupid is putting extremely mildly. 

But letting that go for the moment, I assume there must be some clever property setting or something built into the control to handle this issue that, unfortunately, I just can't seem to find.  So my question is, what is Infragistics secret on how to handle this issue?  And PLEASE, don't tell me I'm supposed to intercept, test, and replace the standard .net system NO DATE (i.e. min date value) with the Infragistics min acceptable date value. 

Finally, I absolutely can't believe that ANYBODY would create a Date data type that wouldn't accept 0 (i.e. 00/00/0000) as a valid value.  That's just @!#$R%T^& STUPID.   Thanx for letting me get that off my chest.

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    Wolven said:
    My first question is, WHO would create a control that wouldn't accept the Minimum value of a date as defined by the .net system that the control was designed to be used with?  To say that that's stupid is putting extremely mildly.

     One answer to this question is Microsoft, Inc., who designed the MonthCalendar control that is used in the dropdown portion of the UltraDateTimeEditor. The minimum allowable date accepted by that control is 1/1/1753, and if we allow dates earlier than that, the MonthCalendar will cause exceptions to be thrown, rendering the control unusable. That is the reason that we imposed a limit on the date.

    Wolven said:
    So my question is, what is Infragistics secret on how to handle this issue?

    I am speculating about the problem you are trying to solve here, but the control exposes a Value property which is of type object and supports null as a valid assignment.

    Wolven said:
    Finally, I absolutely can't believe that ANYBODY would create a Date data type that wouldn't accept 0 (i.e. 00/00/0000) as a valid value.  That's just @!#$R%T^& STUPID.   Thanx for letting me get that off my chest.

    This too is attributable to a design decision made by Microsoft.

Children