components
components copied to clipboard
Change the year range in a multi-year view in mat-datepicker
Feature Description
The possibility to control the year range in a multi-year view in the mat-datepicker in Angular Material 7.
What is the current behavior?
Currently the default range of 24 years starts from 2016-2039, and each page backwards offers another 24-year range.
Use Case
I need to show a different year range in the multi-year view in the mat-datepicker. I need the possibility to manipulate the year range to be different than the default (which is 2016-2039 in the starting view), e.g. 2010-2033. This will improve the UX of an application where customers mostly select years beginning from 2010 (customers now need to go to the previous page with a year range from 1992-2015.
Any workaround for this?
Any Updates? Any solutions how I can change total amount of cells or amount of cells in a row on 'year'/'month' views? Now I have to use horrible hack
dateClass: MatCalendarCellClassFunction<Date> = (cellDate, view) => {
if (view === 'year') {
return `year-cell-${cellDate.getMonth()}`;
}
return '';
};
And than apply absolute positions to classes... and here I just want to change the month view to

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.
Find more details about Angular's feature request process in our documentation.
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
Any workaround for this?