"M K" <sk*******@yahoo.com> wrote in
news:Py*******************@twister.southeast.rr.co m:
Can you initialize the DateTimePicker to "" or Null? I want the date
to be optional so it should be blank at first unless the user selects
a date. If not, is there another solution?
Mark
One way to clear the text is to use blank custom format:
DateTimePicker1.Format = DateTimePickerFormat.Custom
DateTimePicker1.CustomFormat = " " ' need a space
then once you want it to be displayed again reset it to
whatever format you want:
DateTimePicker1.Format = DateTimePickerFormat.Short
It will still have a value when there is no text.