Specify only YEAR and MONTH for minimum / maximum input date attributes
i has the following:
<input type="date" max="2014-10-31">
Can I specify only the year and month ? I think it would be like this:
<input type="date" max="2014-10-xx">
or simply
<input type="date" max="2014-10">
(if the format is yyyy / mm / dd).
And HTML does the rest. I cannot determine a specific day, only the year and month (given by the server side), because for each month there are different maximum days (for example, February, which has 28). Therefore, it cannot be maximized.
31 [] max, 28, 30 , , input , , , - .
, , :
Date(day/month/year): <input type="date" value="2017-07-20" min="2000-01-01" max="2020-01-01">
<hr />
Date(Month/Year): <input type="month" value="2017-07" min="2000-01" max="2020-01">
<hr />
Date(year): <input type="number" value="2017" min="2000" max="2020">
Live demo: https://jsfiddle.net/2fupfqgz/2/