Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check if date is less than today

function TDate() {
    var UserDate = document.getElementById("userdate").value;
    var ToDate = new Date();

    if (new Date(UserDate).getTime() <= ToDate.getTime()) {
          alert("The Date must be Bigger or Equal to today date");
          return false;
     }
    return true;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #check #date #today
ADD COMMENT
Topic
Name
4+2 =