Angular Material DatePicker: Month and Day Picker with Selector

我只是一个虾纸丫 提交于 2020-03-25 13:49:56

问题


The following datepicker, has only Month and Day, with no year as intended. However, it does not have a Month selector as the picture below. How do I fix to allow a Month Picker, with no year? Trying to modify code from the question below .

Angular Material DatePicker: Month and Day, Exclude Year

https://stackblitz.com/edit/angular-hw54xf

It probably needs to be injected in the periodLabel row below.

<div class="example-header">
   <button mat-icon-button (click)="previousClicked('month')">
    <mat-icon>keyboard_arrow_left</mat-icon>
  </button>
  <span class="example-header-label">{{periodLabel}}</span> <!-- probably need to add code in this line -->
  <button mat-icon-button (click)="nextClicked('month')">
    <mat-icon>keyboard_arrow_right</mat-icon>
  </button>
</div>

来源:https://stackoverflow.com/questions/60840203/angular-material-datepicker-month-and-day-picker-with-selector

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!