Skip to content

Commit 555903d

Browse files
author
Daniel Hopkins
authored
Fix onCloseModal for android
1 parent 95c7d64 commit 555903d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ class DatePicker extends Component {
171171
date: new Date(year, month, day)
172172
});
173173
this.datePicked();
174+
} else {
175+
this.onPressCancel();
174176
}
175177
}
176178

@@ -180,6 +182,8 @@ class DatePicker extends Component {
180182
date: Moment().hour(hour).minute(minute).toDate()
181183
});
182184
this.datePicked();
185+
} else {
186+
this.onPressCancel();
183187
}
184188
}
185189

@@ -195,6 +199,8 @@ class DatePicker extends Component {
195199
is24Hour: is24Hour,
196200
mode: androidMode
197201
}).then(this.onDatetimeTimePicked.bind(this, year, month, day));
202+
} else {
203+
this.onPressCancel();
198204
}
199205
}
200206

@@ -204,6 +210,8 @@ class DatePicker extends Component {
204210
date: new Date(year, month, day, hour, minute)
205211
});
206212
this.datePicked();
213+
} else {
214+
this.onPressCancel();
207215
}
208216
}
209217

0 commit comments

Comments
 (0)