当我们点击atp时间选择器时,表单中的其他必填字段将突出显示(Angular 4)

时间:2018-02-23 10:55:29

标签: javascript html html5 angular timepicker

Java Script函数,用于在scheduledStartTime中打开和保存选定的时间

open() {
    const amazingTimePicker = this.atp.open();
    amazingTimePicker.afterClose().subscribe(time => {
        this.campusEventForm.patchValue({
            scheduledStartTime: time,
        });
    });
}

用于显示Atp-Time-Picker的HTML代码

<mat-form-field class="width100">
        <input matInput class="inputTime1" [readonly]="true" placeholder="Schedule Start Time"
         tabindex="6" id="scheduledStartTime" name="scheduledStartTime"
          required="required" formControlName="scheduledStartTime">
        <button atp-time-picker class="inputTime2" [disabled]="readonly" (click)="open()"></button> 
</mat-form-field>

0 个答案:

没有答案