4

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

kian
  • 1,449
  • 2
  • 13
  • 21
Anuj kumar
  • 57
  • 5

0 Answers0