From 555903ddfa1cb39290f95b553585fbaaf07cd149 Mon Sep 17 00:00:00 2001 From: Daniel Hopkins Date: Fri, 5 May 2017 02:08:11 -0700 Subject: [PATCH] Fix onCloseModal for android --- index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.js b/index.js index 74341a6a11..9db14ce7a7 100644 --- a/index.js +++ b/index.js @@ -171,6 +171,8 @@ class DatePicker extends Component { date: new Date(year, month, day) }); this.datePicked(); + } else { + this.onPressCancel(); } } @@ -180,6 +182,8 @@ class DatePicker extends Component { date: Moment().hour(hour).minute(minute).toDate() }); this.datePicked(); + } else { + this.onPressCancel(); } } @@ -195,6 +199,8 @@ class DatePicker extends Component { is24Hour: is24Hour, mode: androidMode }).then(this.onDatetimeTimePicked.bind(this, year, month, day)); + } else { + this.onPressCancel(); } } @@ -204,6 +210,8 @@ class DatePicker extends Component { date: new Date(year, month, day, hour, minute) }); this.datePicked(); + } else { + this.onPressCancel(); } }