Skip to content

Replies

0
Markus Accola
Markus Accola answered on May 27, 2010 3:18 PM

Hi Mike,

that is exactly I decided to do. I changed my underlying data table (and database) to allow NULL. The editor display text is empty if the value is NULL.

The reason why I did not allowed NULL so far is not to care about open date intervalls and validating data etc.. Would be easier to deal always with full defined date ranges.

Thanks for answer.

Markus

0
Markus Accola
Markus Accola answered on May 27, 2010 8:09 AM

Hi Mike,

If I add a new datarow to my dataset I initialize my dateFrom to TODAY and my dateTo to DateTime.MaxValue. Bound this fields to DateTimeEditor looks as expected: the dateTo Field is empty because the Date is not valid that means my daterange is 'open' to the end.

But on validating, I see that the date from the editor is set to somewhat 01.01.0001. Setting the value to the maxDate the control can handle, but it is displayed by the control.

How initialize a open date range from today forward ? How to prevent displaying min- and max-dates?

Regards. Markus