Skip to content

Commit 053a815

Browse files
authored
Merge pull request #22 from Wadjetz/fix-onCancel
Call onCancel callback for TimePicker cancel button
2 parents e214932 + 583aa1a commit 053a815

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/CustomDatePickerAndroid/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ export default class CustomDatePickerAndroid extends Component {
5252
let selectedDate = new Date(year, month, day, hour, minute);
5353
this.props.onConfirm(selectedDate);
5454
}
55+
if (action === TimePickerAndroid.dismissedAction) {
56+
this.props.onCancel();
57+
}
5558
});
5659
} else {
5760
this.props.onConfirm(date);

0 commit comments

Comments
 (0)