Skip to content

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

Closed

Description

@julianobrasil

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

Activity

  1. added
    feature
    on Jan 18, 2018
  2. mmalerba commented on Jan 27, 2018

    @mmalerba
    Contributor

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

  3. added
    help wanted
    on Jan 27, 2018
  4. julianobrasil commented on Jan 27, 2018

    @julianobrasil
    ContributorAuthor

    Ok. I'll give it a shot.

  5. angular-automatic-lock-bot commented on Sep 8, 2019

    @angular-automatic-lock-bot

    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.

  6. locked and limited conversation to collaborators on Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featurehelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions