Is there any way to hide the year part html calendar panel, only show month and day part on the calendar.
Asked
Active
Viewed 1.0k times
1 Answers
10
Unfortunately there's no easy answer, however you can use an alternative method to force the user to enter only month and date by using javascript.
var year = new Date().getFullYear();
document.getElementById('date').setAttribute("min", year + "-01-01");
document.getElementById('date').setAttribute("max", year + "-12-31");
<input type='date' id='date' />
The above code locks the year to current year, so the user will only be able to enter the month and the date.
If you still want to try the hard way, read these articles

Roshana Pitigala
- 8,437
- 8
- 49
- 80