react-native-date-picker
Advanced tools
Comparing version 3.2.1 to 3.2.2
{ | ||
"name": "react-native-date-picker", | ||
"version": "3.2.1", | ||
"version": "3.2.2", | ||
"description": "A Cross Platform React Native Picker", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -11,2 +11,6 @@ import React from 'react' | ||
const height = 180 | ||
const timeModeWidth = 240 | ||
const defaultWidth = 310 | ||
class DatePickerAndroid extends React.PureComponent { | ||
@@ -21,3 +25,3 @@ render() { | ||
onChange={this._onChange} | ||
style={[styles.picker, this.props.style]} | ||
style={this.getStyle()} | ||
utc={this.props.timeZoneOffsetInMinutes !== undefined} | ||
@@ -28,2 +32,7 @@ /> | ||
getStyle = () => { | ||
const width = this.props.mode === 'time' ? timeModeWidth : defaultWidth | ||
return [{ width, height }, this.props.style] | ||
} | ||
_onChange = e => { | ||
@@ -66,9 +75,2 @@ const jsDate = this._fromIsoWithTimeZoneOffset(e.nativeEvent.date).toDate() | ||
const styles = StyleSheet.create({ | ||
picker: { | ||
width: 310, | ||
height: 180, | ||
}, | ||
}) | ||
export default DatePickerAndroid |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
141458
500