-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
feat(date-picker): How to tell whether the picker has been touched? #21643
Labels
area: material/datepicker
feature
This issue represents a new feature or feature request rather than a bug or bug fix
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Comments
andreElrico
added
feature
This issue represents a new feature or feature request rather than a bug or bug fix
needs triage
This issue needs to be triaged by the team
labels
Jan 20, 2021
crisbeto
added
area: material/datepicker
has pr
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
and removed
needs triage
This issue needs to be triaged by the team
labels
Jan 20, 2021
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jan 20, 2021
… closed Currently we mark the date input model as touched when it is blurred or the user types something in, however opening and closing the calendar is also an indicator that the user has interacted with it. These changes add some logic to mark the inputs as touched when the calendar is closed as well. Fixes angular#21643.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jan 20, 2021
… closed Currently we mark the date input model as touched when it is blurred or the user types something in, however opening and closing the calendar is also an indicator that the user has interacted with it. These changes add some logic to mark the inputs as touched when the calendar is closed as well. Fixes angular#21643.
andrewseguin
pushed a commit
that referenced
this issue
Jan 25, 2021
… closed (#21646) Currently we mark the date input model as touched when it is blurred or the user types something in, however opening and closing the calendar is also an indicator that the user has interacted with it. These changes add some logic to mark the inputs as touched when the calendar is closed as well. Fixes #21643.
andrewseguin
pushed a commit
that referenced
this issue
Jan 25, 2021
… closed (#21646) Currently we mark the date input model as touched when it is blurred or the user types something in, however opening and closing the calendar is also an indicator that the user has interacted with it. These changes add some logic to mark the inputs as touched when the calendar is closed as well. Fixes #21643. (cherry picked from commit b559786)
wagnermaciel
pushed a commit
to wagnermaciel/components
that referenced
this issue
Jan 26, 2021
… closed (angular#21646) Currently we mark the date input model as touched when it is blurred or the user types something in, however opening and closing the calendar is also an indicator that the user has interacted with it. These changes add some logic to mark the inputs as touched when the calendar is closed as well. Fixes angular#21643.
mmalerba
pushed a commit
to mmalerba/components
that referenced
this issue
Jan 29, 2021
… closed (angular#21646) Currently we mark the date input model as touched when it is blurred or the user types something in, however opening and closing the calendar is also an indicator that the user has interacted with it. These changes add some logic to mark the inputs as touched when the calendar is closed as well. Fixes angular#21643.
wagnermaciel
pushed a commit
to wagnermaciel/components
that referenced
this issue
Feb 8, 2021
… closed (angular#21646) Currently we mark the date input model as touched when it is blurred or the user types something in, however opening and closing the calendar is also an indicator that the user has interacted with it. These changes add some logic to mark the inputs as touched when the calendar is closed as well. Fixes angular#21643.
wagnermaciel
pushed a commit
to wagnermaciel/components
that referenced
this issue
Feb 8, 2021
… closed (angular#21646) Currently we mark the date input model as touched when it is blurred or the user types something in, however opening and closing the calendar is also an indicator that the user has interacted with it. These changes add some logic to mark the inputs as touched when the calendar is closed as well. Fixes angular#21643.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: material/datepicker
feature
This issue represents a new feature or feature request rather than a bug or bug fix
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Feature Description
please refer: https://stackblitz.com/edit/angular-dfewqd?file=src/app/datepicker-disabled-example.html
how can we assess that the datepicker icon has been clicked (the popup opened) so essentially the control has been touched? (refer second datepicker in stackblitz)
Use Case
I want to style error state when control is invalid AND it has been touched (meaning the datepicker-popup opened already)
This currently does not work as the input in disabled and therefore it can never be touched :/.
Workaround
My workaround using click on the date-toggle does not work as the method _open() uses prevent-propagation.
The other option is to monkey patch
_open()
. Highly undesirable.components/src/material/datepicker/datepicker-toggle.ts
Line 116 in 8172d06
would you consider the date-control is touched when the picker-popup has opened?
The text was updated successfully, but these errors were encountered: