mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 03:01:51 +08:00
Fix setting text property to number. (#3449)
Fix setting JS property from native.
This commit is contained in:
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user