title: Convert the string to date in javascript
body: <p>I'm taking a date as an input to textbox and compare that input date with current date for validation. but i don't know how to convert string date to date.</p>
  
  <p><code>var dateText = document.getElementById("textBoxId").value;</code></p>
  
  <p>Simply I want to compare <code>dateText</code> with <code>Date()</code></p>