I’ve got an issue, but I’m not sure if it’s something I’m doing wrong, or if this feature just isn’t supported yet.
Basically I have the following lines of code:
<input type="text" name="lastname" id="lastname" value="" placeholder="Last name" />
<input type="date" name="dob" id="dob" value="" placeholder="Date of birth" />
I’ve tested this on the desktop version of Safari and all good, but when I test it on the iPad, the second input doesn’t show the placeholder text. Does anyone know if placeholder text is supported on type=”date” on the iPad?
Cheers
Nick
The iPad is doing the correct thing. The
placeholderattribute isn’t supported oninputelements on typedate. It’s probably working on desktop Safari because that doesn’t support thedatetype, so that attribute is being ignored and you’re left with a plain text field. You could check in the DOM inspector.