How to rename DEFAULT in the <input type ="date" > tag

Asked

Viewed 702 times

-1

I’m putting in a form one input type=date , with this he returns to me mm/dd/aaaa.

I would like that, instead of appearing this, appeared anything else that I typed, as for example "Initial Date".

The tag label, would put a text "Side or top".

  • 2

    Do you want the placeholder to appear the text you defined, or do you want the guy to type anything into a type ="date"? It wasn’t very clear

1 answer

0


Hello.

Try it this way and call me back:

<input placeholder="Data Inicial" type="text" onfocus="(this.type='date')" onblur="(this.type='text')" id="date">

That way it gets better.

  • 2

    Just warning that just below the answer there is the "edit" button. You can use it to change your answer, do not need to delete and create another one. By the way, be very careful with the act of excluding, because the system punishes users who delete content constantly with suspension.

  • It worked. Thank you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.