Click here to Skip to main content
15,077,641 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm using datetimepicker in C#, it's showing all dates in calendar view, I want all the dates should be displayed in calendar view as its working fine. But I want, we can able to select any past date from the datetimepicker, but not any future date. I mean, I want all future dates should be disabled so that we can not select any future date.

What I have tried:

dateTimePicker1.MaxDate = DateTime.Now;
Posted
Updated 2-Mar-18 6:47am

1 solution

   

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