mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
@@ -14,6 +14,7 @@ class E2EPage {
|
||||
webkitOpenSourced = '2005-06-17T11:06Z';
|
||||
chromeReleased = '2008-09-02';
|
||||
leapYearsSummerMonths = '';
|
||||
convertedDate = '';
|
||||
|
||||
leapYearsArray = [2020, 2016, 2008, 2004, 2000, 1996];
|
||||
|
||||
@@ -39,6 +40,10 @@ class E2EPage {
|
||||
this.leapYearsSummerMonths = null;
|
||||
}
|
||||
|
||||
convertDate() {
|
||||
this.convertedDate = new Date(this.myDate).toISOString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -68,6 +68,18 @@
|
||||
<code>Leap year, summer months: {{leapYearsSummerMonths}}</code><br>
|
||||
</p>
|
||||
|
||||
<button (click)="clearLeapYear()">Clear Leap Years</button>
|
||||
<p>
|
||||
<button (click)="clearLeapYear()">Clear Leap Years</button>
|
||||
</p>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>myDate: {{myDate}}</ion-label>
|
||||
<ion-datetime displayFormat="MMM DD, YYYY HH:mm" [(ngModel)]="myDate"></ion-datetime>
|
||||
</ion-item>
|
||||
|
||||
<p>
|
||||
<button (click)="convertDate()">Convert myDate To Date</button>
|
||||
{{convertedDate}}
|
||||
</p>
|
||||
|
||||
</ion-content>
|
||||
|
||||
Reference in New Issue
Block a user