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

fix(timepicker): add ng-touched class on focus #3956

Merged
merged 6 commits into from
May 12, 2021

Conversation

rmirville
Copy link
Contributor

@rmirville rmirville commented Jan 18, 2021

Fixes #3852

Adds a focus event handler to NgbTimepicker's hour, minute, and second inputs, in order to link the focus event to Angular's ng-touched and ng-untouched css classes.

@rmirville rmirville changed the title Issue/3852 fix(timepicker): add ng-touched class on focus Jan 18, 2021
Copy link
Member

@maxokorokov maxokorokov left a comment

Choose a reason for hiding this comment

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

Hey, @rmirville!

LGTM, but:

the form control should be marked as touched on blur, not on focus (https://angular.io/api/forms/AbstractControl#touched):

A control is marked touched once the user has triggered a blur event on it.

Cheers,
Max

@maxokorokov maxokorokov modified the milestones: 9.1.0, 9.1.1 Mar 23, 2021
Copy link
Member

@maxokorokov maxokorokov left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@maxokorokov maxokorokov merged commit 21f8f05 into ng-bootstrap:master May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ngb-timepicker Stay untouched until a value is set
2 participants