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.
|
_open(event: Event): void { |
would you consider the date-control is touched when the picker-popup has opened?
we could add @output or Observable for clicks on the triger button.
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?