Reputation: 135
I am trying to add border around mat calander , but unable to do it as , I am not able to find the exact class which will affect the look of the mat calander exactly that I needed like >>>>> .
I have tried to do exactly like same given above with class
.mat-form-field-flex {
border: 1px solid ;
}
https://stackblitz.com/angular/bajnpdvmbqo?file=src%2Fapp%2Fdatepicker-overview-example.css
Upvotes: 0
Views: 2441
Reputation: 81
You can use ::ng-deep selector like this
::ng-deep .mat-form-field-flex {
border: 1px solid gray; }
check below link for more reference https://ngrefs.com/latest/styling/ng-deep-selector
Upvotes: 0
Reputation: 648
This can be done easily using appearance="outline" in mat-form-field tag like
<mat-form-field appearance="outline">
<input matInput [matDatepicker]="picker" placeholder="Choose a date">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker>
Hope it helps!
Upvotes: 2