Component matDatepicker

Asked

Viewed 135 times

1

Thus the value coming from the database is populated in the component

<input matInput disabled
name="dataInicio" [(ngModel)]="empresa.dataInicio"
placeholder="Data início de atividade do banco *">

Not like this:

<input matInput [matDatepicker]="dataInicio" disabled
name="dataInicio" [(ngModel)]="empresa.dataInicio"
placeholder="Data início de atividade do banco *">
<mat-datepicker-toggle matSuffix [for]="dataInicio"></mat-datepicker-toggle>
<mat-datepicker #dataInicio disabled="false"></mat-datepicker>

In the model this fields is like this: dataInicio: Date; or so datahome: string;, is not completed.

What can it be ?

No answers

Browser other questions tagged

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