-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Closed
Copy link
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/datepicker
Description
What are you trying to do?
When creating a mat-datepicker component we have the following example:
<mat-datepicker #picker>
<mat-datepicker-actions *ngIf="prop$ | async">
...
</mat-datepicker-actions>
</mat-datepicker>Within this datepicker's header, there's a mat-slide-toggle that updates the props$ state to T/F. However, when updated, the mat-datepicker-actions remain visible within the template...
Is there a way to ensure the actions can be shown/removed without having to close and repoen the datepicker popover?
What troubleshooting steps have you tried?
- Force change detection via
ChangeDetectorRef. - Utilize the
registerActionsandremoveActionsmethods onMatDatepicker.
Reproduction
https://stackblitz.com/edit/components-issue-xiz8hd?file=src/app/example-component.ts
Environment
- Angular: 13
- CDK/Material: 13
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/datepicker