delete dd / mm / yyyy from an input type date


Hello everyone knows how to delete the letters that are put in the input type date, so that it remains blank as an input typo text ?

There in the picture is what I need please read it.

asked by Jhona JM 25.09.2018 в 20:36

3 answers


You can apply javascript using the following statement

document.getElementById('id de tu input).innerHtml = "";

Another way using javascript, is using the name of the input

document.getElementByName('name asociado a tu input).innerHtml ="";

It can also be done by jquery

$("#id del input").val("");

Another option, which occurs to me without having to program is to delete the placeholder from the html element I hope to be of help, greetings

answered by 25.09.2018 в 22:56

you can remove the placeholder element from your input type date

::-webkit-datetime-edit-day-field:not([aria-valuenow]) {
color: transparent;
<input type=date>
answered by 25.09.2018 в 20:40

The effect to realize that is called "placeholder" that basically assigns a false text to the input.

<input type="text"; placeholder="Fecha Doc."></input>
answered by 25.09.2018 в 22:15