Take Angular Datepicker value

Asked

Viewed 381 times

0

I wanted to take the value of data picker in my component.ts angular.

It follows 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?

1 answer

0

You can do it like this:

this.seuForm.get('serializedDate').value

Browser other questions tagged

You are not signed in. Login or sign up in order to post.