title: How to get value from a bootstrap datepicker input with angular 7
body: <p>I'am coding with angular 7 and bootstrap 4. I used bootstrap datepicker to select date and trying to get data from it .</p>
  
  <p>My html code is like that :</p>
  
  <pre><code>&lt;div class="col-lg-8 form-group"&gt;
        &lt;input id="startDate" type="text" placeholder="From" 
        class="form-control" bsDatepicker
        [bsConfig]="{ adaptivePosition: true, 
        dateInputFormat:'YYYY-MM-DD'}" (change)="onDateSelect($event)" &gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and the JavaScript function is:</p>
  
  <pre><code> selectedStartDate: string;
   onDateSelect(event) {
       this.selectedStartDate = event.target.value;
       console.log(this.selectedStartDate)
     }
  </code></pre>
  
  <p>I'm getting "undefined" as a result.</p>
  
  <pre><code>selectedStartDate = undefined
  </code></pre>
  
  <p>can anyone help me to get the value of the selected date from the bootstrap datepicker ?</p>