Javascript how to check if a date is greater than or equal to a date value
<p>I'm currently trying to see if the date value is set to today's date or greater. </p>

<pre><code>var date = document.getElementById("inputDate").value;
var varDate = new Date(date); //dd-mm-YYYY
var today = new Date();

if(varDate &gt;= today) {
//Do something..
alert("Working!");
}
</code></pre>

<p>Date format dd-mm-YYYY</p>

<p>The current code above won't work.</p>