Is it possible to detect if the browser supports input type="date" with placeholder?
Is it possible to detect if the browser supports input type=date with placeholder ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The W3 validator says placeholder attributes are not valid on date inputs. Validating this HTML:
Gives the error: “
Attribute placeholder not allowed on element input at this point.” … and says you can use the attribute “placeholder when type is text, search, url, tel, e-mail, password, or number“.Also, Chrome doesn’t show the placeholder for date inputs, even though it thinks the attribute exists in JS (this is roughly how Modernizr checks for attributes):