I have imported MatDatepickerModule
and getting mat-datepicker-actions
are not known. I guess there is some other module that needs to import. Here is code snippet:
<mat-form-field appearance="fill" class="example-form-field">
<mat-label>Choose a date</mat-label>
<input matInput [matDatepicker]="datepicker">
<mat-datepicker-toggle matSuffix [for]="datepicker"></mat-datepicker-toggle>
<mat-datepicker #datepicker>
<mat-datepicker-actions>
<button mat-button matDatepickerCancel>Cancel</button>
<button mat-raised-button color="primary" matDatepickerApply>Apply</button>
</mat-datepicker-actions>
</mat-datepicker>
</mat-form-field>
Note: anyone provides solution within the
angular-material
library, not third party (normally has too much size). I'll be thankful.