title: How do I clear/reset date field when using jquery datepicker
body: <p>I am using following code to display datepicker when a user clicks on textbox.</p>
  
  <pre><code>&lt;asp:TextBox ID="StartDate" ClientIDMode="Static" runat="server" Text="" class="mytextbox"&gt;&lt;/asp:TextBox&gt;
  
  $(function () {
          $("#StartDate").datepicker();
      });
  </code></pre>
  
  <p>This is working fine but once user has selected a date, there is no way to clear that textbox as all keys are disabled. </p>
  
  <p>I tried to use the following in that textbox but it doesn't work.</p>
  
  <pre><code>onkeypress="if(e.keyCode == 8 || e.keyCode == 46) { $('#StartDate').datepicker('setDate', null); }"
  </code></pre>
  
  <p>How do I clear the field?</p>