Angular Material 7 Datepicker: Disable multi year view

前端 未结 1 716
不知归路
不知归路 2021-01-25 19:13

I\'m using the MatDatepicker from @angular/material ^7.0.0-rc.0, and I made a little complex filter that compares every visible day in the timepicker with every day of an array

相关标签:
1条回答
  • 2021-01-25 19:21

    You can pass a customized component as the calendar header, this will allow you to override the button currently allowing the user to select multi year view.

    This example does not have the ability to select multi year.

    https://material.angular.io/components/datepicker/overview#customizing-the-calendar-header


    HTML

    reference the custom component on the mat-datepicker

    <mat-datepicker #picker [calendarHeaderComponent]="exampleHeader"></mat-datepicker>
    
    0 讨论(0)
提交回复
热议问题