diff --git a/.maestro/minimum-date.yml b/.maestro/minimum-date.yml
index 284c591..3c7a663 100644
--- a/.maestro/minimum-date.yml
+++ b/.maestro/minimum-date.yml
@@ -29,6 +29,14 @@ tags:
- runFlow: utils/swipe-wheel-3-up.yml
- assertVisible: '2000-01-01 23:59:00'
+### test: should ignore seconds and milliseconds
+- runFlow:
+ file: utils/change-minimum-date.yml
+ env:
+ VALUE: '2000-01-01 23:59:59.999'
+- runFlow: utils/swipe-wheel-2-up.yml
+- assertVisible: '2000-01-01 23:59:00'
+
### test: date mode
- runFlow: utils/change-mode-date.yml
diff --git a/src/DatePickerAndroid.js b/src/DatePickerAndroid.js
index 128f36a..286a65c 100644
--- a/src/DatePickerAndroid.js
+++ b/src/DatePickerAndroid.js
@@ -27,7 +27,14 @@ class DatePickerAndroid extends React.PureComponent {
if (props.modal) return null
- return
+ return (
+
+ )
}
getId = () => {
@@ -110,6 +117,13 @@ class DatePickerAndroid extends React.PureComponent {
this.isClosing = true
this.props.onCancel()
}
+
+ _withoutSecond = (date) => {
+ if (!date) return date
+ date.setSeconds(0)
+ date.setMilliseconds(0)
+ return date
+ }
}
export default DatePickerAndroid