-9
You can "hide" the mask by setting the default text color to transparent, and then putting the black color back when the input
is focused or valid. It worked on Chrome and Firefox, IE doesn’t seem to accept type=date
, but somehow it also becomes 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>
You just want to remove the content and leave it empty or want to show something?
– Lucas Brogni
blocks the code ?
– aa_sp
Just leave it empty
– Higor soares ferreira