Skip to content

Instantly share code, notes, and snippets.

@shohag-cse-knu
Created September 10, 2018 11:31
Show Gist options
  • Save shohag-cse-knu/14a8be7db3f7cefea8e782c46dd31d6b to your computer and use it in GitHub Desktop.
Save shohag-cse-knu/14a8be7db3f7cefea8e782c46dd31d6b to your computer and use it in GitHub Desktop.
jQuery Regex date validation
var date_regex = /^(0[1-9]|1[0-2])\/(0[1-9]|1\d|2\d|3[01])\/(19|20)\d{2}$/ ;
if(!(date_regex.test(inputed_date))
{
return false;
}else{
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment