Link to home
Start Free TrialLog in
Avatar of dbote
dboteFlag for United States of America

asked on

DateTime Picker error

I'm getting the following error message when setting the value to a DateTime Picker using VB.NET.

'Value of '4/15/0218 12:00:00 AM' is not valid for 'Value'. 'Value' should be between 'MinDate' and 'MaxDate'.
Parameter name: Value'

The date is definitely between the MinDate and MaxDate so I am not understanding the issue.  It's not a Null so many of the items I have read don't seem to apply.

When I type the following code

dtpDateStart.Value = "4/15/2018"  <-- This works

dtpDateStart.Value - MyProto.StartDate  <-- This Fails.  Where MyProto is a Class and StartDate is a Date in the class,

I think that should be everything unless you want the Exception Text.

Thank you,

dbote
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dbote

ASKER

Yes it should.  Clearly I must have some dyslexia issues.  That would make the date NOT between the MinDate & Max Date.

Sorry to waste your time.

dbote
Haha. Definitely not a waste of time. Sometimes fresh eyes are needed :)