Saturday, 5 October 2019

ngb-datepicker not working in angular material input(matInput)

I want to use ngb-datepicker in material Input . I applied datepicker to mat input successfully. but there is an issue with month and year dropdowns.

I tried following snippet :

<mat-form-field>
<input matInput placeholder="Select Valid Till" name="GodownValidTill" [(ngModel)]="GodownValidTill" ngbDatepicker #d2="ngbDatepicker" required readonly>
<mat-icon style="float:right;height:20px;width:20px;" (click)="d2.toggle()" svgIcon="calendar" title="Calendar"></mat-icon>
</mat-form-field>

Is there any solution for perfect working ?



from ngb-datepicker not working in angular material input(matInput)

No comments:

Post a Comment