title: How to validate user input is current date and time?
body: <p>In html i use ext.net datefield </p>
  
  <pre><code> &lt;ext:DateField runat="server"  ID = "date"  Format="Y-m-d hh:mm:ss" SubmitFormat="Y-m-d H:i:s"  MarginSpec="0 0 0 60" FieldLabel="Gate In Date/Time" AllowBlank="false" IndicatorText="*" IndicatorCls="red-text"/&gt;
  </code></pre>
  
  <p>when it view it shows correct date but the time is always 12:00:00.In javascript
  i do it like this </p>
  
  <pre><code>var iframeID = $('iframe').attr('id');
  
  var myDate = lazyMethod_get(iframeID, "formdetail", "date")
  var today = new Date().toISOString().slice(0, 10);
  
  
  alert(myDate);
  alert(today);
  
  if (myDate &gt; today) {
      alert("Entered date is greater than today's date ");
  }
  else {
      alert("Entered date is less than today's date ");
  }}
  </code></pre>
  
  <p>the validation always alert the date entered less than today date. I just want to validate the date and time if the user insert for example 2016-02-03 the date is wrong and get current date.</p>
  
  <p>Thank you.</p>