How do I compare two dates in HTML?
<p>This is my code:</p>
<pre><code>&lt;input type=&quot;date&quot; name=&quot;startDate&quot; id=&quot;startDate&quot; /&gt;
&lt;input type=&quot;date&quot; name=&quot;endDate&quot; id=&quot;endDate&quot; /&gt;
</code></pre>
<p>I want <code>startdate</code> to not exceed <code>endDate</code>. is there a way to compare dates without using jQuery? Like in ASP.NET, we can use CompareValidator.</p>