title: string to date conversion returns NaN
body: <p>I'm using a jquery datetime picker plugin and have three textboxes viz., startdate, enddate, difference. plugin works perfectly, startdate string (dd/MM/yyyy HH:mm) format gets converted correctly but enddate string doesn't get converted to Date object and it returns NaN. can anyone help  me?
  here's my code:-</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          $(document).ready(function () {
              $('#&lt;%= txtEndDate.ClientID %&gt;').bootstrapMaterialDatePicker
              ({
                  weekStart: 0, format: 'DD/MM/YYYY HH:mm', shortTime: true
              });
              $('#&lt;%= txtStartDate.ClientID %&gt;').bootstrapMaterialDatePicker
              ({
                  weekStart: 0, format: 'DD/MM/YYYY HH:mm', shortTime: true
              }).on('change', function (e, date) {
                  $('#&lt;%= txtEndDate.ClientID %&gt;').bootstrapMaterialDatePicker('setMinDate', date);
              });
              $('.mb').change(function () {
                  var start = $('#&lt;%= txtStartDate.ClientID %&gt;').val();
                  alert('start:-'+start);
                  var end1 = $('#&lt;%= txtEndDate.ClientID %&gt;').val();
                  alert('end:-'+end1);
  
                  if (start != "" &amp;&amp; end1 != "") {
                      var eDate = Date.parse(end1);
                      var sDate = Date.parse(start);
  
                      alert(sDate);
                      alert(eDate);// gives NaN
                      var diff = Math.abs(eDate - sDate);
                      alert(diff);
                      // get total seconds between the times
                      var delta = diff / 1000;
  
                      // calculate (and subtract) whole days
                      var days = Math.floor(delta / 86400);
                      delta -= days * 86400;
  
                      // calculate (and subtract) whole hours
                      var hours = Math.floor(delta / 3600) % 24;
                      delta -= hours * 3600;
  
                      // calculate (and subtract) whole minutes
                      var minutes = Math.floor(delta / 60) % 60;
                      delta -= minutes * 60;
  
                      // what's left is seconds
                      var seconds = delta % 60;
  
                      $('#&lt;%= txtDifference.ClientID %&gt;').val(parseInt(days) + ":" + parseInt(hours) + ":" + parseInt(minutes) + ":" + parseInt(seconds));
                  }
              })
          });
      &lt;/script&gt;
  </code></pre>
  
  <p><code>alert('start:-'+start);</code> gives start:-12/11/2017 20:52<code>alert('end:-'+end1);</code> gives end:-13/11/2017 20:54
  <code>alert(sDate);</code> gives 1513005720000
  <code>but alert(eDate);</code> gives NaN</p>