Tagged: angular material
- This topic has 2 replies, 2 voices, and was last updated 3 years, 9 months ago by knowledgeplaces.
-
AuthorPosts
-
knowledgeplacesParticipantI use MyEclipse to build an Angular 10 application which uses Angular material.
In this application, I have a component template using a date range picker as presented here:
https://next.material.angular.io/components/datepicker/overviewI have the exact same code in my app (excerpt below):
<mat-form-field appearance="fill"> <mat-label i18n>Validity period</mat-label> <mat-date-range-input [rangePicker]="validityPeriodPicker"> <input matStartDate formControlName="accountStartDate"> <input matEndDate formControlName="accountEndDate"> </mat-date-range-input> <mat-datepicker-toggle matSuffix [for]="validityPeriodPicker"></mat-datepicker-toggle> <mat-date-range-picker #validityPeriodPicker> <mat-date-range-picker-actions> <button mat-button matDateRangePickerCancel>Cancel</button> <button mat-raised-button color="primary" matDateRangePickerApply>Apply</button> </mat-date-range-picker-actions> </mat-date-range-picker> </mat-form-field>
I cannot compile since I have the following error on tag :
‘mat-date-range-picker-actions’ is not a known element:If I remove this tag, it compiles.
Please tell me how to fix this, as my code is exactly the same as the sample code provided by Angular.
- This topic was modified 3 years, 9 months ago by knowledgeplaces.
- This topic was modified 3 years, 9 months ago by knowledgeplaces.
- This topic was modified 3 years, 9 months ago by knowledgeplaces.
support-swapnaModeratorHi,
It looks like you need to update the Angular Material version for the actions to work.
Please see similar report here and check if updating the Material version helps : https://stackoverflow.com/questions/66132625/getting-error-mat-date-range-picker-actions-is-not-a-known-element–Swapna
Genuitec Support
knowledgeplacesParticipantHi Swapna,
Thanks, I have updated the required librairies and it compiles fine now.
-
AuthorPosts