SHARE
TWEET

Untitled

a guest Jul 17th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var selectedDate = document.getElementById("dateexecution").value;
  2. var items = selectedDate.split('/');
  3. var seldate = new Date(items[2],items[1]-1,items[0]);
  4.  
  5. var todaysDate = new Date();
  6.  
  7. if(todaysDate > selectedDate){
  8.  alert("Too old");
  9.  document.getElementById("dateexecution").style.border="2px solid red";
  10.  document.getElementById("dateexecutionerror").style.display="inline";
  11. }
RAW Paste Data
Top