title: How to detect date selection in ng-bootstrap Datepicker on input field?
body: <p>We use the <a href="https://ng-bootstrap.github.io/#/components/datepicker/api#NgbInputDatepicker" rel="noreferrer">ng-bootstrap Datepicker as Directive</a> in our project:</p>
  
  <pre><code>&lt;input class="form-control"
           name="dp" ngbDatepicker #d="ngbDatepicker" (blur)="d.close()" [(ngModel)]="model"
           (ngModelChange)="onDateSelected()"&gt;
  </code></pre>
  
  <p>The <strong>current</strong> behaviour is that <code>onDateSelected()</code> is called when a date in the datepicker is selected, as well as every time a change is made to the input field.</p>
  
  <p>The <strong>desired</strong> behaviour is that <code>onDateSelected()</code> is called whenever the user clicks on a date in the datepicker or moves the cursor out of the <code>&lt;input&gt;</code> (i.e. blur).</p>
  
  <p>My approach was to change <code>(ngModelChange)</code> to <code>(blur)</code>:</p>
  
  <pre><code>&lt;input class="form-control"
           name="dp" ngbDatepicker #d="ngbDatepicker" (blur)="d.close(); onDateSelected()"
           [(ngModel)]="model"&gt;
  </code></pre>
  
  <p>but this leads to <code>onDateSelected()</code> <em>not</em> being called, when a date is selected from the datepicker - which kinda makes sense, because the cursor is not inside the <code>&lt;input&gt;</code>. However, I could not find some sort of <code>dateSelected</code>-Event when searching the <a href="https://ng-bootstrap.github.io/#/components/datepicker/api#NgbInputDatepicker" rel="noreferrer">ng-bootstrap docs</a> on which I could call <code>onDateSelected()</code>:</p>
  
  <pre><code>&lt;input class="form-control"
           name="dp" ngbDatepicker #d="ngbDatepicker" (blur)="d.close(); onDateSelected()"
  /* missing -&gt; */ (dateSelected)="onDateSelected()" /* &lt;- */ [(ngModel)]="model"&gt;
  </code></pre>
  
  <p>Is there something I miss? Or maybe another way to implement this behaviour? I can't think of being the only one with this requirement...</p>