Answers for "ion-datetime current date"

2

ion-datetime min date today

myDate: String = new Date().toISOString();
...
<ion-datetime displayFormat="YYYY-MM-DD" [(ngModel)]="myDate"></ion-datetime>
Posted by: Guest on November-19-2020
2

ion datetime time current set

public date:any = new Date().toISOString();
...
<ion-datetime [(ngModel)]="date"
    displayFormat="MMM DD, YYYY HH:mm"
    formControlName="myDate">
</ion-datetime>
Posted by: Guest on November-29-2020

Browse Popular Code Answers by Language