我必须输入字段,首先输入要从后端服务获取日期 并显示要查看的日期,第二个输入是日期选择器的输入, 我如何使第一个输入的值更新值 日期选择器的第二个输入。
例如:我从类似10/05/1995的后端服务获取日期,但很好 当我打开日期选择器时,日期选择器的值是今天的日期 不是10/05/1995。
如何使我从服务中获得的价值更新日期选择器
<div class="mb-24" fxLayout="row">
<mat-form-field fxFlex>
<input matInput [(ngModel)]="client.Birthday" formControlName="Birthday" placeholder="{{'Ditëlindja' | translate}}" required tabindex="3">
<input matInput [hidden]='true' [matDatepicker]="picker">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker (selectedChanged)="updateDateToString($event)"></mat-datepicker>
</mat-form-field>
</div>
这是发生的事情的图片 I got like this, the two input are not the same
提前谢谢