mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
test(date time): datetime without max value
This commit is contained in:
@ -7,6 +7,18 @@ import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
export class E2EPage {
|
||||
tokyoTime = this.calculateTime(1);
|
||||
|
||||
calculateTime(offset: number) {
|
||||
// create Date object for current location
|
||||
const d = new Date();
|
||||
|
||||
// create new Date object for different city
|
||||
// using supplied offset
|
||||
const nd = new Date(d.getTime() + (3600000 * offset));
|
||||
|
||||
return nd.toISOString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -83,4 +83,26 @@
|
||||
></ion-datetime>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
displayFormat="DD-MM-YYYY"
|
||||
pickerFormat="DD MM YYYY"
|
||||
min="2017-03-20"
|
||||
</ion-label>
|
||||
<ion-datetime
|
||||
displayFormat="DD-MM-YYYY"
|
||||
pickerFormat="DD MM YYYY"
|
||||
min="2017-03-20"
|
||||
></ion-datetime>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Tokyo</ion-label>
|
||||
<ion-datetime
|
||||
displayFormat="hh:mm A"
|
||||
[(ngModel)]="tokyoTime"
|
||||
></ion-datetime>
|
||||
</ion-item>
|
||||
|
||||
|
||||
</ion-content>
|
||||
|
@ -494,7 +494,7 @@ export class Tabs extends Ion implements AfterViewInit, RootNode {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getActiveChildNav() {
|
||||
getActiveChildNav(): Tab {
|
||||
return this.getSelected();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user