title: HTML5 Input pattern for date
body: <p>My attempt:</p>
  
  <pre><code>  Year &lt;select ng-options="x for x in ['2018']" required&gt;      &lt;/select&gt; 
    Month: &lt;input  pattern="[0-1][0-9]" maxlength="2"   required&gt;&lt;/input&gt; 
    Day: &lt;input  pattern="[0-3][0-9]" maxlength="2"   required&gt;&lt;/input&gt;  
  </code></pre>
  
  <p>Create input box for Year, Month, and Day , which has following input validation. Do you have any suggestion for the HTML5 input form pattern which accepts the following parameters?  </p>
  
  <ul>
  <li>Year [2018]</li>
  <li>Month [01-12]</li>
  <li>Day [01-31] for Month [1,3,5,7,8,10,12]</li>
  <li>Day [01-30] for Month [4,6,9,11]</li>
  <li>Day [01-28] for Month [2]</li>
  </ul>
  
  <p>Can the following condition  be added to the input pattern.</p>
  
  <ul>
  <li>if month 1 is selected, input box for the day allows 1-31, </li>
  <li>if month 2 is selected, input box for the day allows 1-28 </li>
  </ul>