Reputation: 93
I want to open bootstrap 4 date picker on the click of input field. i don't want to display calender icon How can I resolve this issue?
Upvotes: 9
Views: 5551
Reputation: 2823
You can do something like this:
<input
readonly
placeholder="yyyy-mm-dd"
class="form-control"
ngbDatepicker
(click)="datePicker.toggle()"
#datePicker="ngbDatepicker">
I created a small demo example here: https://stackblitz.com/edit/angular-anhgsg
Upvotes: 9
Reputation: 206
Give click function (click)="d.toggle()"
to input field instead of giving to calendar icon
Upvotes: 2