Date" /> Date" /> Date"/>

Can I add mat-icon and mat-label in single line under mat-form-field

802 Views Asked by At

I'm trying to add a tooltip icon beside the mat-label of a form field. Is there a way to do that

<mat-form-field appearance="outline">
 <mat-label>Date</mat-label>
 <mat-icon class="help" svgIcon="faQuestionCircle" [matTooltip]="Date"></mat-icon>
 <input matInput formControlName="date" [matDatepicker]="picker" (dateInput)="setDate($event.value)"
                [min]="todayDate" />
 <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
 <mat-datepicker #picker></mat-datepicker>
</mat-form-field>

If I try to add an icon inside the label then the tooltip is not getting displayed.

Date ?

enter image description here

0

There are 0 best solutions below