我想以编程方式打开ng日期时间(owl日期时间)选取器对话框?
date-time-picker
-
“打开选取器作为对话框”
第节。
HTML
<mat-select [(ngModel)]="createAnnounceReq.sendStatus" formControlName="sendStatus" (change)="onChange_Status($event.value)">
<mat-option *ngFor="let item of sendStatusList; let i = index;" [value]="item.value">
{{ item.label }}
//dropdown is like
- Today (Now)
- 1week a head
- 3 months a head
- pick specific date
</mat-option>
</mat-select>
<input [owlDateTimeTrigger]="dt5" [owlDateTime]="dt5" readonly>
<owl-date-time [pickerMode]="'dialog'" #dt5></owl-date-time>
键入脚本
.....
@Component({
selector: 'app-announce-send',
templateUrl: './announce-send.component.html',
styleUrls: ['./announce-send.component.css'],
providers : [AnnourceService]
})
export class AnnounceSendComponent implements OnInit {
.....
onChange_Status(value) {
if(value == something) {
// here how to open picker dialog programmatically
}
}
.....
}