Placeholder does not work for input type date
and datetime-local
directly.
<input type="date" placeholder="Date" />
<input type="datetime-local" placeholder="Date" />
Instead the field shows mm/dd/yyy on desktop and nothing on mobile.
How can I show the Date placeholder text?
use
onfocus="(this.type='date')"
, example: