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

Calendar needs "onClose" event #1874

Closed
bomberblue07 opened this issue Jan 20, 2017 · 5 comments
Closed

Calendar needs "onClose" event #1874

bomberblue07 opened this issue Jan 20, 2017 · 5 comments
Labels
Type: New Feature Issue contains a new feature or new component request
Milestone

Comments

@bomberblue07
Copy link

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[x ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

It would be nice if the Calendar emitted an "onClose" event that fires when the user has potentially selected a date and is done interacting with the Calendar. That way, any code I need to fire when a date/time is selected, doesn't fire every time the user increments the minute.

@Mrtcndkn
Copy link
Contributor

There is an onBlur event on calendar which is exactly what you want i guess. @bomberblue07

@tanat
Copy link

tanat commented Mar 22, 2017

@Mrtcndkn onBlur fires always, when input text blurred (when you click on calendar window)

@cagataycivici cagataycivici added the Type: New Feature Issue contains a new feature or new component request label Jun 19, 2017
@cagataycivici cagataycivici added this to the 4.1.0 milestone Jun 19, 2017
@cagataycivici
Copy link
Member

@Mrtcndkn, add onClose please.

@rklempert
Copy link

This fix is broken in Firefox - event is not defined:

bindDocumentClickListener() {
if(!this.documentClickListener) {
this.documentClickListener = this.renderer.listen('document', 'click', () => {
if(this.closeOverlay) {
this.overlayVisible = false;
this.onClose.emit(event);
}

            this.closeOverlay = true;
            this.dateClick = false;
            this.cd.detectChanges();
        });
    }
}

this.onClose.emit(event); need to pass in event object

@nagpvn2
Copy link

nagpvn2 commented Aug 10, 2017

How to allow p-calendar to display only years. I didn't found any property for this. could you please help me in this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

No branches or pull requests

6 participants