delete dd / mm / yyyy from an input type date

3

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
source

3 answers

3

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
2

you can remove the placeholder element from your input type date

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

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