1

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

3
  • Hi Amii, could you please share the minimum reproducible code Commented Jun 23, 2023 at 13:05
  • Please provide enough code so others can better understand or reproduce the problem. Commented Jul 3, 2023 at 20:21
  • I am stuck with this exact behavior, what was the cause? Commented Dec 10, 2024 at 13:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.