猫头鹰日期时间值未设置

时间:2021-06-30 18:30:57

标签: angular5 owl-date-time

<form [formGroup]="filters" style="margin: 0 2px 4px;">
    <mat-card>
      <mat-card-content fxLayout="column" fxLayoutGap="7px">
        ...
        <mat-form-field>
            <input matInput formControlName="from" [owlDateTimeTrigger]="fromDate" [owlDateTime]="fromDate" placeholder="{{'timeTracking.from' | translate}}">                
        </mat-form-field>                
        <owl-date-time #fromDate></owl-date-time>
        <mat-form-field>
            <input matInput formControlName="till" placeholder="{{'timeTracking.till' | translate}}" [owlDateTimeTrigger]="tillDate" [owlDateTime]="tillDate">                
        </mat-form-field>            
        <owl-date-time #tillDate></owl-date-time>
        ...         
      </mat-card-content>
    </mat-card>
</form>

组件:

this.filters = new FormGroup({
  idItemType: new FormControl(),
  idUser: new FormControl({value: null}),
  justMe: new FormControl(false),
  isManul: new FormControl(false),
  from: new FormControl(null),
  till: new FormControl(null)
});

我可以选择一个值并按下 Set 按钮,但在该值未保存到输入字段之后: Example

0 个答案:

没有答案
相关问题