Skip to content

Commit

Permalink
feat: pass locale to native control if given
Browse files Browse the repository at this point in the history
If given a `locale` prop, pass to native control to override,
this is landing in React Native 0.52.
  • Loading branch information
blackxored committed Jan 5, 2018
1 parent 905dfbd commit 60e3887
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ class DatePicker extends Component {
TouchableComponent,
testID,
cancelBtnTestID,
confirmBtnTestID
confirmBtnTestID,
locale
} = this.props;

const dateInputStyle = [
Expand Down Expand Up @@ -397,6 +398,7 @@ class DatePicker extends Component {
minuteInterval={minuteInterval}
timeZoneOffsetInMinutes={timeZoneOffsetInMinutes}
style={[Style.datePicker, customStyles.datePicker]}
locale={locale}
/>
</View>
<TouchableComponent
Expand Down Expand Up @@ -476,7 +478,8 @@ DatePicker.propTypes = {
placeholder: PropTypes.string,
modalOnResponderTerminationRequest: PropTypes.func,
is24Hour: PropTypes.bool,
getDateStr: PropTypes.func
getDateStr: PropTypes.func,
locale: PropTypes.string,
};

export default DatePicker;

0 comments on commit 60e3887

Please sign in to comment.