Monday, April 24, 2006

Captain's Log, Stardate NULL

Today I discovered a need for a data-bound DateTimePicker to support the display and input of NULL values. I remembered reading a blog a short while ago about someone else who had already developed a solution.
 
Google helpfully pointed me to Alexander Shirshov's original solution that I had read before. However I also spotted Claudio Grazioli's solution on Code Project which apparently correct some bugs in Alexander's implementation. I downloaded the source, gave it a try and it works very neatly.
 
If anyone would like the source for the NullableDateTimePicker in VB.NET instead of C# just leave a comment.