From c79bd5ab814bde01b3cd1bae463d5ba6dbaf4aa8 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Thu, 16 Mar 2017 19:18:07 +0100 Subject: [PATCH] test(date time): datetime without max value --- .../datetime/test/issues/app.module.ts | 12 ++++++++++ src/components/datetime/test/issues/main.html | 22 +++++++++++++++++++ src/components/tabs/tabs.ts | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/components/datetime/test/issues/app.module.ts b/src/components/datetime/test/issues/app.module.ts index 1e0379b623..fcd7af452f 100644 --- a/src/components/datetime/test/issues/app.module.ts +++ b/src/components/datetime/test/issues/app.module.ts @@ -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(); + } } diff --git a/src/components/datetime/test/issues/main.html b/src/components/datetime/test/issues/main.html index cf6fb55c52..14ac80ca9a 100644 --- a/src/components/datetime/test/issues/main.html +++ b/src/components/datetime/test/issues/main.html @@ -83,4 +83,26 @@ > + + + displayFormat="DD-MM-YYYY" + pickerFormat="DD MM YYYY" + min="2017-03-20" + + + + + + Tokyo + + + + diff --git a/src/components/tabs/tabs.ts b/src/components/tabs/tabs.ts index 36ff1cd089..d1ebb605b4 100644 --- a/src/components/tabs/tabs.ts +++ b/src/components/tabs/tabs.ts @@ -494,7 +494,7 @@ export class Tabs extends Ion implements AfterViewInit, RootNode { /** * @internal */ - getActiveChildNav() { + getActiveChildNav(): Tab { return this.getSelected(); }