title: Comparing time and date in javascript
body: <p>Lets say there are two textboxes, one to enter in a date and the other to enter in time. Below is an example:</p>
  
  <pre><code>&lt;p&gt;&lt;strong&gt;Date:&lt;/strong&gt; &lt;input type="text" id="datetxt"&gt;&lt;/p&gt;
  
  Example of how date is displayed: 25-05-1995
  
  &lt;p&gt;&lt;strong&gt;Time:&lt;/strong&gt; &lt;input type="text" id="timetxt"&gt;&lt;/p&gt;
  
  Example of how time is displayed: 14:25
  </code></pre>
  
  <p>Can someone suggest a way in javascript to compare values of the date and time from the textboxes to the current date and time so if the current date and time is past the date and time entered in the textboxes, then it should display and alert?</p>