It's impossible to use placeholder on date fields but I really need it.
I want two date inputs with texts "From" and "To" on each one as placeholders.
It's impossible to use placeholder on date fields but I really need it.
I want two date inputs with texts "From" and "To" on each one as placeholders.
Using a jQuery (sure you can achieve this with Vanilla. This make sure the date format still the same.
You can use CSS's before pseudo.
FIDDLE
CSS
As mentionned here, I've made it work with some ":before" pseudo-class and a small bit of javascript. Here is the idea :
Then in javascript, add the "not_empty" class depending on the value in the onChange and onKeyUp events.
You can even add all of this dynamically on every date fields. Check my answer on the other thread for the code.
It's not perfect but it's working well in Chrome and iOS7 webviews. Maybe it could help you.
You can do something like this:
As i mentioned here
initially set the field type to text.
on focus change it to type date