Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
henninghall committed Feb 26, 2024
1 parent e2bb860 commit 73d8ba1
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/DatePickerAndroid.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,7 @@ class DatePickerAndroid extends React.PureComponent {

if (props.modal) return null

return (
<NativeComponent
{...props}
maximumDate={this._withoutSecond(props.maximumDate)}
minimumDate={this._withoutSecond(props.minimumDate)}
onChange={this._onChange}
/>
)
return <NativeComponent {...props} onChange={this._onChange} />
}

getId = () => {
Expand Down Expand Up @@ -117,13 +110,6 @@ 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

0 comments on commit 73d8ba1

Please sign in to comment.