Looking to add a datepicker to my application, I first attempted using bootstrap datepicker without success. Next, I tried ngBootstrap, but encountered the same issue - clicking the icon did not display the calendar. It seems as though the icon is not functioning properly.
Here is my code:
<form class="form-inline">
<div class="form-group">
<div class="input-group">
<input class="form-control" placeholder="yyyy-mm-dd"
name="dp" [(ngModel)]="modelDate" ngbDatepicker #d="ngbDatepicker">
<div class="input-group-addon" (click)="d.toggle()" >
<img src="img/calendar-icon.svg" style="width: 1.2rem; height: 1rem; cursor: pointer;"/>
</div>
</div>
</div>
Model: {{ modelDate | json }}