9

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?

Richa Shah
  • 93
  • 1
  • 3

2 Answers2

9

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

SplitterAlex
  • 2,755
  • 2
  • 20
  • 23
2

Give click function (click)="d.toggle()" to input field instead of giving to calendar icon

Rakesh A R
  • 186
  • 1
  • 2
  • 17