Click here to Skip to main content
15,912,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I set minimum date value in DateTimePicker 01/01/0001 or any date before 01/01/1753 in C#??
Posted
Comments
Sandeep Mewara 22-Dec-12 5:34am    
You cannot!

1 solution

You can't - the minimum date for a DTP is 1st Jan 1753 (to match with SQL server which also had this restriction until SQL Server 2008 which introduced teh DaetTime2 type which supports 1/1/1) THis was becasue of the trasnition from the Julian calender to teh Gregorian calander which happened in the that year.

While you can change the DateTimePicker.MinDate value, you cannot set it before 1/1/1753, so you cannot enter any value prior to this.

[edit]Corrected date in last line - OriginalGriff[/edit]
 
Share this answer
 
v2
Comments
Abhishek Pant 22-Dec-12 4:53am    
1/11753 or 1/1753 in last line?
OriginalGriff 22-Dec-12 4:56am    
1/1/1753 - corrected.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900