0

I'm binding date to a date time picker control like this on windows form.

       dtpDOB.Value = Convert.ToDateTime(reader[4]);

And when I want to clear it I'm using this code under a button click event. This is how I do that.

      dtpDOB.Format = DateTimePickerFormat.Custom;
        dtpDOB.CustomFormat = "";
        dtpDOB.Checked = false;

But it does not work. How to solve this?

braX
  • 11,506
  • 5
  • 20
  • 33
ChathurawinD
  • 756
  • 1
  • 13
  • 35

1 Answers1

0

this should help you example1 To display blank in the picker field

and this too Example2

Community
  • 1
  • 1
varsha
  • 1,620
  • 1
  • 16
  • 29