From: Connull on
I have set the minimum and maximum dates allowed in a datetimepicker. If I
type a date in the datetimepicker that is before the minimum value I have set
it reverts back to today's date which is fine, however, if I 'drop down' the
date selection and use the arrow keys to go to a date before the minimum
value I get the following error:
Value of 'datetime' is not valid for 'Value'. 'Value' should be between
'MinDate' and 'MaxDate'. Parameter name: Value
How can I counter this error in my code?
From: kevinp on
You could use the LostFocus event to check for a valid date.


On Mon, 29 Mar 2010 06:45:01 -0700, Connull
<Connull(a)discussions.microsoft.com> wrote:

>I have set the minimum and maximum dates allowed in a datetimepicker. If I
>type a date in the datetimepicker that is before the minimum value I have set
>it reverts back to today's date which is fine, however, if I 'drop down' the
>date selection and use the arrow keys to go to a date before the minimum
>value I get the following error:
>Value of 'datetime' is not valid for 'Value'. 'Value' should be between
>'MinDate' and 'MaxDate'. Parameter name: Value
>How can I counter this error in my code?
 | 
Pages: 1
Prev: Finding Bold Text in RichTextbox
Next: A solution!