Datetime Empty

Hello. A question please. By default a DateTimePicker shows the current day and time. Is there a way to clear this and show this control empty ?

Thanks...

[167 byte] By [NetPochi] at [2007-12-28]
# 1

By default no... you could always implement your own user control that hides a contained DateTimePicker until a value is set.

The reason for this lack of a more... null/default state is that the DateTime class is a value type and thus cannot be null (ignoring for the moment nullable values that were introduced in 2.0) and then you end up with the undesirable position of possibly having to define a symbolic date whose value means null but still accidentally usable.

You also may try an extended DataTimePicker control like this one that may do some of what you are looking for.

BrendanGrant at 2007-9-4 > top of Msdn Tech,Visual Basic,Visual Basic Language...