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>