Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you set a DateTimePicker to be read only?

I have a DateTimePicker (nullable version) that I need to be read only. I'm not happy with the display if it is disabled, so wanted to know if anyone had a nifty example of how to stop updates on the field?

Thanks.

like image 212
cjk Avatar asked Mar 18 '09 12:03

cjk


1 Answers

I know this is very old but to help anyone else searching for this (As it was the first one I found through google) You can use:

this.dateTimePicker1.Enabled = false;

to make it act the same way as a a textbox would with this.textbox1.ReadOnly = true

like image 154
Sam Avatar answered Oct 08 '22 09:10

Sam