1

http://msdn.microsoft.com/en-us/library/aa446530.aspx

but there is no possibility to null date or to delete date from text field.

how to remove date from textfield or how to connect TextField with DateTimePicker

senzacionale
  • 20,448
  • 67
  • 204
  • 316

1 Answers1

3

To display blank you can set it as

DateTimePicker1.Format = DateTimePickerFormat.Custom;
DateTimePicker1.CustomFormat = "";

and then reset the format in ValueChanged event to the desired format. The picker doesn't allow null values since it requires a valid DateTime object.

You may choose to have a custom control also as found here

V4Vendetta
  • 37,194
  • 9
  • 78
  • 82
  • thx you. I will choose this custom control. What if i want delete date from design? Delete button not working, i can not delete any text in DateTimePicker – senzacionale Sep 26 '11 at 11:17
  • i've done this in the past and works fine, i just used a different customformat where i would replace the date inputs by underscores, so dd-MM-yyyy would show up as __-__-____ – Miguel Marques Sep 26 '11 at 12:01