Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(MatDatepicker): observable that emits the seleced year in year mode #9458

Closed
julianobrasil opened this issue Jan 18, 2018 · 3 comments · Fixed by #9678
Closed

feat(MatDatepicker): observable that emits the seleced year in year mode #9458

julianobrasil opened this issue Jan 18, 2018 · 3 comments · Fixed by #9678
Assignees
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix help wanted The team would appreciate a PR from the community to address this issue

Comments

@julianobrasil
Copy link
Contributor

julianobrasil commented Jan 18, 2018

Bug, feature request, or proposal:

feature

What is the expected behavior?

When you click on year label, the calendar switches to multi-year mode. After that, when you select an year, there could be an observable or @Output property that emits the year (a number) chosen before switching to the year view.

Following this path, it would be nice if there was another observable that emits the month (a number) when the month is selected (in the year view), also before switching to the month view.

What is the current behavior?

There are no such observables nor @Output properties.

What is the use-case or motivation for changing an existing behavior?

Sometimes you want to choose just an year or a month. I think some day there will be this possibility, but for now, such a feature could help a lot, as the developer could just get the year selected and close the calendar programmatically.

Is there anything else we should know?

It's related to #4853, but it seems to be a quickier solution that does no harm in the long term.

@mmalerba

@mmalerba mmalerba added the feature This issue represents a new feature or feature request rather than a bug or bug fix label Jan 18, 2018
@mmalerba
Copy link
Contributor

I'd be fine with this change, seems like a reasonable way to let people work around current limitations

@mmalerba mmalerba added the help wanted The team would appreciate a PR from the community to address this issue label Jan 27, 2018
@julianobrasil
Copy link
Contributor Author

Ok. I'll give it a shot.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix help wanted The team would appreciate a PR from the community to address this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants