Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input id="date_of_birth" name="date_of_birth" placeholder="dd.mm.yyyy" style=":invalid">
- <script>
- $("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.'});
- </script>
- <style>input#date_of_birth:valid{color:green}input#date_of_birth:invalid{color:red}</style>
Add Comment
Please, Sign In to add comment