title: JQueryUI datepicker is not setting/posting the value of the textbox after a date is selected
body: <p>The textbox starts with a value of 1/1/0001, which I am assuming is the default starting date for a new datetime.  The issue is that after a date is selected from the datepicker menu, the value on the HTML element is never changed and 1/1/0001 gets posted to the controller after the form is submitted.  The text within the textbox is changed, but when using the browser dev tools the value is still 1/1/0001.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="row col-12 formdatepicker"&gt;
      &lt;input asp-for="StartDate" type="text" class="form-control" id="startdatepicker" /&gt;
      &lt;span style="margin-left: 8px; margin-right: 8px; padding-top: 5px;"&gt;to&lt;/span&gt;
      &lt;input asp-for="EndDate" type="text" class="form-control" id="enddatepicker" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$(document).ready(function () {
      $("#startdatepicker").datepicker({
          onSelect: function () {
              alert($('#startdatepicker').val());
          }
      });
      $("#enddatepicker").datepicker();
  
      var data = $('form').serialize();
      var dataType = 'application/x-www-form-urlencoded; charset=utf-8';
      $(function () {
          $('#submit').on('click', function (evt) {
              console.log('Submitting form...');
              console.log(data);
              evt.preventDefault();
              //Ajax form post
              $.ajax({
                  type: 'POST',
                  data: data,
                  contentType: dataType,
                  url: '@Url.Action("Daily","Reports")',
                  success: function (data) {
                      if (data.success) {
                          alert("Data Success");
                      } else {
                          console.log(data);
                          //Toggle the error modal and display error messages
                          $('#errorsModal').modal('toggle');
                          //Add &lt;br&gt; tags when there is a linebreak in the string.  This will add the line breaks into the HTML.
                          $('#errorsModal .modal-body p').html(data.message.replace(/(?:\r\n|\r|\n)/g, '&lt;br&gt;'));
                      }
                  }
              });
          });
      });
  });
  </code></pre>
  
  <p>The <code>.datepicker()</code> initializations are working correctly because the datepicker menu's are appearing when the textbox is clicked.  The onSelect alert never appears though when the value is changed.  </p>