Super Duper DateTimePicker

For a C# WinForm project, I've always looked for a similar implementation of a control (that's GPLed or whatever) and then tweaking it to fit my (or my clients') needs. Don't we all do that these days with awesome websites such as codeproject.com, csharpcorner.com, 4guysfromrolla.com, dotnetkicks.com, etc, etc

Let's do a DateTimePicker.. while its a VAST improvement over validating date/times and mask controls on VB6 shudder there's a lot of missing items to it. First is the ability to allow blank dates. Come on EVERY single datetimepicker must have a date? So came across this control on codeproject.com -- nullableDateTimePicker.cs. Sweeeeet!!

As I am banging away coding and having fun with the nullableDateTimePicker control... a nasty thing bolted me back into reality. The Enabled = false on ANY of the controls that comes with VS.NET shaded the text so bad that it's so similar to the color of the default form's background. What the heck?

Here we go again... Sure, we can make a TextBox1.ReadOnly = true; -- shaded background with black text, but pretty much the rest of controls don't have a "ReadOnly" property!

So found a ReadOnlyComboBox, perfect...

Uh-oh, we need to make a nullableDateTimePicker have a ReadOnly property. Using the concept behind the ReadOnlyComboBox, I combined two of his (yea, the same guy) code into one to make a super-duper nullableDateTimePicker control. [Download zipped NullableDateTimePicker.cs]

Where are you, Claudio?? Hope to see you around in one of those .NET conventions!