Get value from the Angle Datepicker

0

I wanted to get the value of data picker in my component.ts of Angular.

Follow my code data picker :

<div class="form-group col-md-6 form-md-line-input" style="margin-top:-95px;">
   <mat-form-field>
      <input matInput [matDatepicker]="picker" placeholder="Data de Expedição"
      [formControl]="serializedDate">
      <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
      <mat-datepicker #picker ></mat-datepicker>
   </mat-form-field>
</div>

How do I get the value of this input ?

    
asked by anonymous 16.10.2018 / 19:20

1 answer

0

You can do this:

this.seuForm.get('serializedDate').value
    
16.10.2018 / 19:50