title: Date comparison returns "NaN"
body: <p>I stuck with one issue, here I would like to compare two dates, but it is giving "NaN". I tried with below code, </p>
  
  <pre><code>&lt;input type="text" value="10-10-2015 20:00:08" id="startDateVal"/&gt;
  &lt;input type="text" value="11-10-2015 23:00:10" id="lpoendDate_1"/&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>var startDateVal = $("#lpoendDate_1").val().replace(/-/gi,'/');
  
  var endDateVal = $("#lpostartDate_1").val().replace(/-/gi,'/');
  
  var testresult = (new Date(endDateVal) - new Date(startDateVal) ) / 1000 / 60 / 60;
  
  alert(testresult);
  </code></pre>
  
  <p><a href="http://jsfiddle.net/t9y1337e/8/" rel="nofollow">Fiddle</a></p>