Calendar needs "onClose" event
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.
There is an onBlur event on calendar which is exactly what you want i guess. @bomberblue07
@Mrtcndkn onBlur fires always, when input text blurred (when you click on calendar window)
@Mrtcndkn, add onClose please.
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
How to allow p-calendar to display only years. I didn't found any property for this. could you please help me in this.