Data type Date

Asked

Viewed 483 times

-3

I have a doubt and I do not know if it is possible in Html. Within a form I have several types of fields and one of them is the type DATE that receives (Day/month/Year) and now I wanted to change this to receive only (month/year).

I can make that change simply?

This uses Jquery and Html

 <center> <b><h2> <p>Dados Estatisticos:</p> </b> </center>
<h3><center> 
    Data:
    <input type="date" name="EstatisticosValidade"> 
  • 3

    are you using any mask in the field? uses jquery? add more details to help you.

  • Yes, you can. But in order to help, you have to answer Filipe’s comment.

2 answers

1

Utilize Month in place of date. Maybe that’ll solve your problem.

<input type="month" name="EstatisticosValidade">

0

You can use two fields (type Month and type number, with minimum and maximum value) or separate by javascript or php the value entered in the type date field. I usually use the second option.

Browser other questions tagged

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