unable to use mat-date-range-picker-actions

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #671798 Reply


    I 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:

    I 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-datepicker-toggle matSuffix [for]="validityPeriodPicker"></mat-datepicker-toggle>
                            <mat-date-range-picker #validityPeriodPicker>
                                    <button mat-button matDateRangePickerCancel>Cancel</button>
                                    <button mat-raised-button color="primary" matDateRangePickerApply>Apply</button>

    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.

    #671809 Reply



    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

    Genuitec Support

    #671814 Reply


    Hi Swapna,

    Thanks, I have updated the required librairies and it compiles fine now.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: unable to use mat-date-range-picker-actions

You must be logged in to post in the forum log in