Click here to Skip to main content
15,886,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Experts,

I was looking for something like. I want to Disable / Grey out all the Dates in Date time picker in my Form that are before Current Date.
I tried the below code. And It doesn't disable instead it just show empty white space which is what I don't want. I actually want to grey out the dates.
dtStart.MinDate = Today


All the google Searches directed me to some third party controls which I cannot use them in project for some reason. Is there any way that I can grey out/ disable the dates before Current Date(Today's Date)
Posted
Comments
Maciej Los 24-Apr-15 16:34pm    
Third party sometimes means custom control ;)

 
Share this answer
 
Comments
sudevsu 24-Apr-15 16:10pm    
Thank you May be you didn't read my question completely. I did use that. Please read my question back.
You have no choice but to make your own version of the control and provide the code to render it yourself.

All of the DatePicker controls I've ever seen don't show anything beyond the MinDate and MaxDate values.
 
Share this answer
 

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