Advertisement
ArdiWidyantoSa

Input Date After Today

Aug 20th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.     var today = new Date();
  3.     var dd = today.getDate();
  4.     var mm = today.getMonth() + 1; //January is 0!
  5.     var yyyy = today.getFullYear();
  6.     if (dd < 10) {
  7.         dd = '0' + dd
  8.     }
  9.     if (mm < 10) {
  10.         mm = '0' + mm
  11.     }
  12.  
  13.     today = yyyy + '-' + mm + '-' + dd;
  14.     document.getElementById("tanggal_pelaksanaan_tera").setAttribute("min", today);
  15. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement