diff --git a/src/date-picker.android.js b/src/date-picker.android.js index 777f6b3..57d7712 100644 --- a/src/date-picker.android.js +++ b/src/date-picker.android.js @@ -1,9 +1,11 @@ import React, { PureComponent } from 'react'; -import { ColorPropType, StyleSheet, View } from 'react-native'; +import { ColorPropType, StyleSheet, View, ViewPropTypes as RNViewPropTypes } from 'react-native'; import PropTypes from 'prop-types'; import moment from 'moment'; import Picker from './picker'; +const ViewPropTypes = RNViewPropTypes || View.propTypes; + const styles = StyleSheet.create({ picker: { flex: 1, @@ -31,7 +33,7 @@ export default class DatePicker extends PureComponent { minimumDate: PropTypes.instanceOf(Date), mode: PropTypes.oneOf(['date', 'time', 'datetime']), onDateChange: PropTypes.func.isRequired, - style: View.propTypes.style, + style: ViewPropTypes.style, textColor: ColorPropType, textSize: PropTypes.number, itemSpace: PropTypes.number, diff --git a/src/picker.js b/src/picker.js index 954f3df..54e87ea 100644 --- a/src/picker.js +++ b/src/picker.js @@ -58,7 +58,7 @@ export default class Picker extends Component { ))}