title: If Datetime value = null then use today's date
body: <p>I'm trying to get it that if no date is selected on the datepicker that instead of submitting null it will submit todays date.</p>
  
  <p>as you can see from the below code I've already tried a number of ways but to no success, there is no viewmodel and it is all on a single page which if I select a date on the datepicker it has no problem.</p>
  
  <p>view page date code</p>
  
  <pre><code>&lt;div class="rowElem"&gt;
      &lt;label for="Date"&gt;Date&lt;/label&gt;
      &lt;div id="cal" style="float:left;"&gt;&lt;/div&gt;
      &lt;%= Html.HiddenFor(h =&gt; Model.Date)%&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Jquery datepicker code</p>
  
  <pre><code>$('#cal').datepicker({
              dateFormat: 'dd/mm/yy',
              [setDefaults: ({ defaultDate: '-0d' }),
              defaultDate: '-0d', tried both this and above line and neither worked]
              onSelect: function (dt, inst) {
                  $('#Date').val(dt);
              }
          });
  </code></pre>
  
  <p>Controller create post code for date</p>
  
  <pre><code>oq.Date = DateTime.Parse(fc["Date"]);
  </code></pre>