if selected date is greater than current date then not workin code example
Example: check if date is greater than current date javascript
var date = document.getElementById("inputDate").value;
var varDate = new Date(date); //dd-mm-YYYY
var today = new Date();
if(varDate >= today) {
//Do something..
alert("Working!");
}