Guest User

Untitled

a guest
Apr 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <input id="date_of_birth" name="date_of_birth" placeholder="dd.mm.yyyy" style=":invalid">
  2. <script>
  3. $("input#date_of_birth").prop('required',!0).attr({'type':'date','max':'2002-12-31','min':'1918-01-01',"pattern":"(?:(?:0[1-9]|1[0-9]|2[0-9])\.(?:0[1-9]|1[0-2])|(?:30)\.(?:(?!02)(?:0[1-9]|1[0-2]))|(?:31)\.(?:0[13578]|1[02]))\.(?:191[89]|19[23456789]\d|200[012])",'title':'dd.mm.yyyy.'});
  4. </script>
  5. <style>input#date_of_birth:valid{color:green}input#date_of_birth:invalid{color:red}</style>
Add Comment
Please, Sign In to add comment