3

I'm trying to use the new date range picker from Angular Material and I need to filter out some certain days (min and max won't be helpful for me here). I used before "matDatepickerFilter" with the normal date picker but I can't find the same thing for the date range picker so I tried instead using "dateFilter".

The problem is that after applying the function I can't select any dates at all.

Here's a code sample of what I mean (stackblitz)

zerocewl
  • 11,401
  • 6
  • 27
  • 53

1 Answers1

7

Adapting the dataFilter definition for mat-date-range-input in the Template should fix your issue.

<mat-date-range-input [rangePicker]="picker"  [dateFilter]="rangeFilter">

Here is a working version of your Stackblitz.

zerocewl
  • 11,401
  • 6
  • 27
  • 53