Skip to content

feat(datepicker): dispatch events when datepicker is opened and closed #7792

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

Merged
merged 1 commit into from
Nov 7, 2017

Conversation

crisbeto
Copy link
Member

Adds the opened and closed events that are dispatched when a datepicker is opened/closed.

Fixes #7626.

@crisbeto crisbeto requested a review from mmalerba as a code owner October 14, 2017 09:04
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 14, 2017
@@ -167,6 +167,12 @@ export class MatDatepicker<D> implements OnDestroy {
*/
@Output() selectedChanged = new EventEmitter<D>();

/** Emits when the datepicker has been opened. */
@Output('opened') openedStream: EventEmitter<void> = new EventEmitter<void>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amcdnl @jelbourn opinions on what we call these? I think select calls them onOpen and onClose (for both property and output name)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmalerba I based the naming on #7160 where onOpen and onClose were changed to opened and closed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok, can we just change the closed property to closedStream then so that it matches openedStream?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@crisbeto crisbeto force-pushed the 7626/datepicker-events branch from 1be91fa to fa52f9d Compare October 15, 2017 20:29
@mmalerba mmalerba added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Oct 15, 2017
@andreevWork
Copy link

Hello this PR solve problem in my project. Thank you, look forward merge it.

Adds the `opened` and `closed` events that are dispatched when a datepicker is opened/closed.

Fixes angular#7626.
@crisbeto crisbeto force-pushed the 7626/datepicker-events branch from fa52f9d to f41745e Compare November 4, 2017 22:23
@josephperrott josephperrott merged commit 998153a into angular:master Nov 7, 2017
@geelus
Copy link

geelus commented Nov 8, 2017

Is there any workaround now? We really need this but so far wasn't able to do it.

I really appreciate any suggestion.

@Jonafran
Copy link

Jonafran commented Jul 2, 2018

Is there some time, this merge is going to be released? It's since 8 months blocked by CI travis fail.

@josephperrott
Copy link
Member

This was included in the 5.0.0-rc1 release

@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 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No event gets fired for mat-datepicker popup close (for the same day)
7 participants