datepicker: filter in year mode only validates first of the month #11703
Comments
Related PR: #11526 |
I have a similar issue with md-datepicker. After version |
@dohomi dates are invalid or months/years are invalid? |
OK, previously in Are you proposing that we should iterate through every date in every displayed month to determine if any date in a specific month is valid, then if any one date in a month is valid do not filter/disable that month? Or is the proposal to add an API like |
I'm fine with any of these 3 ideas (in order of preference):
|
None of these options seem ideal to me. However, I just thought of an alternative that may be better.
Thoughts? |
I like that idea, preserves both use cases without breaking either. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…s first day of month - add `md-month-filter` API - no longer apply `md-date-filter` to year view - fix JSDoc typos - add JSDoc, tests, and demos Fixes #11703
Apologies for the delay, but I've posted a PR for this: #11918. |
…s first day of month - add `md-month-filter` API - no longer apply `md-date-filter` to year view - fix JSDoc typos - add JSDoc, tests, and demos Fixes #11703
Bug, enhancement request, or proposal: Bug
CodePen and steps to reproduce the issue:
CodePen Demo which demonstrates the issue:
https://codepen.io/schliffer/pen/bJBgYP
Detailed Reproduction Steps:
What is the expected behavior?
Any month containing a valid date will be selectable in year mode.
What is the current behavior?
Any month where the 1st of the month is valid is selectable in year mode
What is the use-case or motivation for changing an existing behavior?
To allow users to use the year mode in combination with a date filter.
Which versions of AngularJS, Material, OS, and browsers are affected?
Is there anything else we should know? Stack Traces, Screenshots, etc.
Fixing this issue: #11525 seems to have caused the problem in year mode.
The text was updated successfully, but these errors were encountered: