0

I am using angular and angular material v15. In lazy load component I am using material date picker. When I am going select date from it after selecting date it is not closing. I imported all the necessary modules in shared module file. The date picker was working properly in not lazily loaded component.

I tried to import necessary all the material modules in the lazily loaded module.but it seems not working. enter image description here` <section *ngIf="enableDob">

            <div id="Heading" class="margin-content input-box">
               <input class="form-control" matInput [matDatepicker]="picker" [(ngModel)]="dob" (ngModelChange)="dobCheck(oEligibility.dob)" id="dob" placeholder=" " type="text" />                 
               <mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
               <mat-datepicker #picker></mat-datepicker>
               <label for="dob" class="form-label">date of birth</label>
            </div>
          </section>`

also UI showing this enter image description here

Amii
  • 1
  • 2

0 Answers0