primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Calendar needs "onClose" event

Open bomberblue07 opened this issue 9 years ago • 5 comments

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.

bomberblue07 avatar Jan 20 '17 17:01 bomberblue07

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

Mrtcndkn avatar Jan 23 '17 09:01 Mrtcndkn

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

tanat avatar Mar 22 '17 14:03 tanat

@Mrtcndkn, add onClose please.

cagataycivici avatar Jun 19 '17 12:06 cagataycivici

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

rklempert avatar Jul 17 '17 16:07 rklempert

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

nagpvn2 avatar Aug 10 '17 09:08 nagpvn2