title: Set Null value in DateTimePicker in C#
body: <p>I am developing a <code>winform</code> based Desktop application in C#. I would like the user to set the DateTimePicker to <code>Null</code>. I am developing a search box, and would like to ignore the date if it is set to <code>Null</code></p>
  
  <p>Here is what I am doing : </p>
  
  <pre><code>     this.dateTimePicker2.CustomFormat = " ";
       this.dateTimePicker2.Format = DateTimePickerFormat.Custom;
  
       private void dateTimePicker2_ValueChanged(object sender, EventArgs e)
       {
           this.dateTimePicker2.CustomFormat = "dd-MM-yy";
       }
  </code></pre>
  
  <p>So far so good. However, once the user selects the date, the <code>dateTimePicker2</code> control shows some date ( the date the user has selected). There is no way to set the date to null again. I am not keen to enable the checkbox associated with the <code>datetimepicker</code> control.</p>
  
  <p>I was wondering if it is possible to set the <code>datetimepicker</code> date to <code>null</code>. </p>
  
  <p>Thanks</p>