ion datetime open programmatically

Solutions on MaxInterview for ion datetime open programmatically by the best coders in the world

showing results for - "ion datetime open programmatically"
Kenan
04 Nov 2018
1<ion-datetime #dateTime style="display:none" displayFormat="h:mm A" pickerFormat="h mm A" [(ngModel)]="startTime"></ion-datetime>
2<button (click)="openStart()"></button>
3and then in your code
4...
5//first create a reference to the datetime control:
6@ViewChild('dateTime') sTime;
7...
8//then add your event code: 
9openStart()
10{
11	this.sTime.open();
12}