How do I solve this problem?
I want to remove this "dd / mm / yyyy"
You can "hide" the mask by setting the color of the default text to transparent, and then putting it in the black color back when input
is focused or valid. It worked in Chrome and in FireFox, IE does not seem to accept type=date
, but that way it is also empty and when you click on input
or write something the text turns black.
input[type=date]::-webkit-datetime-edit{ color: transparent; }
input[type=date]:valid::-webkit-datetime-edit{ color: #000; }
input[type=date]:focus::-webkit-datetime-edit{ color: #000; }
input[type=date]{ color: transparent; }
input[type=date]:valid{ color: #000; }
input[type=date]:focus{ color: #000; }
<input type="date" required>