angularangular-materialmat-datepicker

Angular Material Date Picker Range but only choosing year and month


I'm having troubles to find a way to use mat-date-range-picker with only year and month... Did you guys have already find a way to do it ? :)

I've tried to use the same function used in the documentation for the date picker, but i cannot found a way to restart the pop up for the second date....

<mat-datepicker #dp
                  startView="multi-year"
                  (yearSelected)="chosenYearHandler($event)"
                  (monthSelected)="chosenMonthHandler($event, dp)"
                  panelClass="example-month-picker">
</mat-datepicker>

thanks by advance all \o/


Solution

  • Here's an example of a month range-picker popup. Just use this to create a popup. DEMO