Skip to content

Commit b1c91d4

Browse files
authored
[DateTimePicker][Android] Fix double press bug after dismissing DateTimePicker dialog (#1636)
On Android, dismissing the DateTimePicker dialog by clicking Cancel or by clicking on the background overlay will cause a bug whereby you have to press the DateTimePicker input twice into to launch the DateTimePicker dialog again. This is because the expandable overlay is still in the expanded state after dismissing the dialog. This commit fixes this bug by toggling the expandable overlay when the DateTimePicker dialog is dismissed.
1 parent d2b3e23 commit b1c91d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/components/dateTimePicker/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ class DateTimePicker extends Component {
151151
if (Constants.isAndroid) {
152152
this.onDonePressed();
153153
}
154+
} else if (event.type === 'dismissed' && Constants.isAndroid) {
155+
this.toggleExpandableOverlay();
154156
}
155157
};
156158

0 commit comments

Comments
 (0)