Fix setting text property to number. (#3449)

Fix setting JS property from native.
This commit is contained in:
Hristo Hristov
2017-01-09 18:13:31 +02:00
committed by GitHub
parent e3acdcbc78
commit 309ea148e1
23 changed files with 156 additions and 153 deletions

View File

@ -115,22 +115,22 @@ class UIDatePickerChangeHandlerImpl extends NSObject {
let dateChanged = false;
if (comps.year !== owner.year) {
owner.nativePropertyChanged(yearProperty, comps.year);
yearProperty.nativeValueChange(owner, comps.year);
dateChanged = true;
}
if (comps.month !== owner.month) {
owner.nativePropertyChanged(monthProperty, comps.month);
monthProperty.nativeValueChange(owner, comps.month);
dateChanged = true;
}
if (comps.day !== owner.day) {
owner.nativePropertyChanged(dayProperty, comps.day);
dayProperty.nativeValueChange(owner, comps.day);
dateChanged = true;
}
if (dateChanged) {
owner.nativePropertyChanged(dateProperty, new Date(comps.year, comps.month - 1, comps.day));
dateProperty.nativeValueChange(owner, new Date(comps.year, comps.month - 1, comps.day));
}
}