datepicker: filter only affects validation in month mode
Bug, enhancement request, or proposal:
Bug or enhancement i suppose.
CodePen and steps to reproduce the issue:
CodePen Demo which demonstrates the issue:
Detailed Reproduction Steps:
- Make a datepicker
- Set it to month mode
- Try to filter it.
What is the expected behavior?
Filtered months become disabled
What is the current behavior?
Filtered months just register as error states when selected
What is the use-case or motivation for changing an existing behavior?
You have a sparse dataset of dates you want your users to select from.
Them needing to use trial and error to figure out which months are selectable by trying every one makes this feature useless for any case where not every single month is selectable.
Which versions of AngularJS, Material, OS, and browsers are affected?
- AngularJS: I've tried it on 1.5.11 and the one you guys are running on your demos.
- AngularJS Material: 1.1.^6
- OS: Any i'd guess
- Browsers: At least chrome
Is there anything else we should know? Stack Traces, Screenshots, etc.
This use case makes a lot of sense and this is clearly a behavior that we should support. It looks like the year view (month mode) doesn't currently account for md-date-filter at all.
I updated the CodePen to remove some unused datepicker elements.
PR https://github.com/angular/material/pull/11526 opened to add this functionality.
Oh yea sorry for the crap codepen, i was grumpy after a long day.
Glad you're implementing this, it will be nice to be able to remove my jquery hack to apply this.
This fix has created another issue where at the "year" current view, months that start on days that don't pass validation are not clickable. For example, in the Datepicker demo where only weekends are selectable (https://material.angularjs.org/latest/demo/datepicker) if you go back to the "year" view, only months that start with a weekend are selectable.

yes i am also facing same issue @schliffer how did you fixed it. PLease share
@texperts it's being tracked in https://github.com/angular/material/issues/11703.