How to make a date field containing only Month and Year Html

1

I need a date field containing only Month and Year Html, preferably on the screen something like a calendar containing only the months and years.

obs: I'm using angularJs, javascript

    
asked by anonymous 21.09.2017 / 23:10

2 answers

3

With HTML5 you can use type="month"

<input type="month">

Supported by browsers:

  • Chrome 20 +
  • Edge 12
  • Opera 10.62 +
22.09.2017 / 00:59
-4

Create a select month and year.

 <div class="mes">
   <select>
      <option>01</option>
      <option>02</option>
      <option>03</option>
      <option>04</option>
      <option>05</option>
      <option>06</option>
      <option>07</option>
      <option>08</option>
      <option>09</option>
      <option>10</option>
      <option>11</option>
      <option>12</option>
   </select>
</div>

<div class="ano">
   <select>
      <option>1990</option>
      <option>1991</option>
      <option>1992</option>
      <option>1993</option>
      <option>1994</option>
      <option>1995>/option>
      <option>1996</option>
      <option>1997</option>
      <option>1998</option>
      <option>1999</option>
      <option>2000</option>
      <option>2001</option>
   </select>
</div>
    
22.09.2017 / 00:54