Skip to content

feat(Datepicker): Datepicker yearsPerPage value #15

@nerd-cs

Description

@nerd-cs

Is your feature request related to a problem? Please describe.

Angular Material Datepicker Multi-year view has 24 years in the table.
image
Hopefully want to set the yearsPerPage dynamically as well.
<mat-datepicker #picker [yearsPerPage]="N">

Describe the solution you'd like

Can we set this value via API?
<mat-datepicker #picker [yearsPerPage]="N">

Describe alternatives you've considered

We can set date range dynamically using MAT_DATE_RANGE_SELECTION_STRATEGY

/** Injection token used to customize the date range selection behavior. */
export const MAT_DATE_RANGE_SELECTION_STRATEGY =
new InjectionToken('MAT_DATE_RANGE_SELECTION_STRATEGY');

Additional context

angular/components#22253

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions