title: bsDatepicker using formControlName-angular 2+
body: <p>I am working with this example: <a href="https://valor-software.com/ngx-bootstrap/#/datepicker#reactive" rel="nofollow noreferrer">https://valor-software.com/ngx-bootstrap/#/datepicker#reactive</a></p>
  
  <p>HTML</p>
  
  <pre><code>     &lt;form class="clearfix" [formGroup]="projectFormGroup"&gt;  
         &lt;label for="targetDate" class="col-form-label"&gt;Target Date&lt;/label&gt;
         &lt;input type="text"
              placeholder="Datepicker"
              class="form-control"
              bsDatepicker
              [bsConfig]="{ adaptivePosition: true }" formControlName="targetDate"&gt;
       &lt;/form&gt;
  </code></pre>
  
  <p>When I checked the value using <code>&lt;pre&gt;&lt;pre&gt;{{ projectFormGroup?.value | json }}&lt;/pre&gt;&lt;/pre&gt;</code> , the output is,</p>
  
  <pre><code>{
   "targetDate": "2020-02-18T04:55:34.000Z"
   }
  </code></pre>
  
  <p>Actually, I am trying for update data. The value coming from API is like <code>2020/02/18 04:55</code>. I need to show the date which coming from Api in bsDatepicker.</p>
  
  <p>For example,</p>
  
  <p>In ts,</p>
  
  <pre><code> this.projectFormGroup.patchValue({
            targetDate:project.targetDate
    });
  </code></pre>
  
  <p>Problem: When I use this method for any text values like name, its showing automatically in formControlName.Same way I need to show in bsDatepicker.</p>
  
  <p>How I will show the value automatically from Api in below ,
  <a href="https://i.stack.imgur.com/Q28NT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q28NT.png" alt="enter image description here"></a></p>