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

onFocus for Calendar #1766

Closed
variable-content opened this issue Jan 9, 2017 · 3 comments
Closed

onFocus for Calendar #1766

variable-content opened this issue Jan 9, 2017 · 3 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@variable-content
Copy link

variable-content commented Jan 9, 2017

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

Current behavior
Unable to elegantly react to focus event on the calendar input field. I have a wrapping component that needs to change its display when the calendar's input field gains focus. Currently need to use something like renderer.listen(hostEl.nativeElement.querySelector('p-calendar input'), 'focus'... to achieve this.
This component already as an onBlur event, would be nice to include onFocus for parity.

Expected behavior
<p-calendar
[(ngModel)]="value"
(onBlur)="onBlur($event)"
(onFocus)="onFocus($event)">

What is the motivation / use case for changing the behavior?
See above.

  • PrimeNG version: 1.1.4
@Mrtcndkn
Copy link
Contributor

It already has you can just use it like that

@variable-content
Copy link
Author

Sorry, logged a few issues yesterday, this was supposed to about the Calendar, not the Dropdown, will update the issue to reflect this.

@variable-content variable-content changed the title Add onFocus event emitter to dropdown component Add onFocus event emitter to Calendar component Jan 10, 2017
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jan 11, 2017
@cagataycivici cagataycivici added this to the 2.0 milestone Jan 11, 2017
@cagataycivici cagataycivici self-assigned this Jan 11, 2017
@cagataycivici cagataycivici changed the title Add onFocus event emitter to Calendar component onFocus for Calendar Jan 11, 2017
@variable-content
Copy link
Author

Thanks @cagataycivici for getting this merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants