diff --git a/tests/app/ui/tab-view/tab-view-tests.ts b/tests/app/ui/tab-view/tab-view-tests.ts index 0c68e384d..f2243fa4c 100644 --- a/tests/app/ui/tab-view/tab-view-tests.ts +++ b/tests/app/ui/tab-view/tab-view-tests.ts @@ -271,6 +271,7 @@ export class TabViewTest extends testModule.UITest { tabView.on(tabViewModule.TabView.selectedIndexChangedEvent, (args: tabViewModule.SelectedIndexChangedEventData) => { actualOldIndex = args.oldIndex; actualNewIndex = args.newIndex; + TKUnit.assertEqual(args.object, tabView, "args.object should be TabView") }); tabView.selectedIndex = expectedNewIndex; diff --git a/tns-core-modules/ui/tab-view/tab-view-common.ts b/tns-core-modules/ui/tab-view/tab-view-common.ts index 0f319d686..8861a607a 100644 --- a/tns-core-modules/ui/tab-view/tab-view-common.ts +++ b/tns-core-modules/ui/tab-view/tab-view-common.ts @@ -171,7 +171,7 @@ export class TabViewBase extends View implements TabViewDefinition, AddChildFrom export const selectedIndexProperty = new CoercibleProperty({ name: "selectedIndex", defaultValue: -1, affectsLayout: isIOS, valueChanged: (target, oldValue, newValue) => { - target.notify({ eventName: TabViewBase.selectedIndexChangedEvent, object: this, oldIndex: oldValue, newIndex: newValue }); + target.notify({ eventName: TabViewBase.selectedIndexChangedEvent, object: target, oldIndex: oldValue, newIndex: newValue }); }, coerceValue: (target, value) => { let items = target.items; diff --git a/tns-core-modules/ui/time-picker/time-picker-common.ts b/tns-core-modules/ui/time-picker/time-picker-common.ts index 68616069e..733aa08eb 100644 --- a/tns-core-modules/ui/time-picker/time-picker-common.ts +++ b/tns-core-modules/ui/time-picker/time-picker-common.ts @@ -106,8 +106,7 @@ export var hourProperty = new Property({ // picker._setNativeTime(); if (picker.time) { picker.time.setHours(picker.hour); - } - else { + } else { picker.time = new Date(0, 0, 0, picker.hour, picker.minute); } } else { @@ -136,6 +135,7 @@ export var maxHourProperty = new Property({ if (!isHourValid(newValue)) { throw new Error(getErrorMessage(picker, "maxHour", newValue)); } + if (isValidTime(picker)) { // picker._setNativeMaxTime(); } else { @@ -155,8 +155,7 @@ export var minuteProperty = new Property({ // picker._setNativeTime(); if (picker.time) { picker.time.setMinutes(picker.minute); - } - else { + } else { picker.time = new Date(0, 0, 0, picker.hour, picker.minute); } } else {