Skip to content

Commit 60e3887

Browse files
committed
feat: pass locale to native control if given
If given a `locale` prop, pass to native control to override, this is landing in React Native 0.52.
1 parent 905dfbd commit 60e3887

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

datepicker.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ class DatePicker extends Component {
338338
TouchableComponent,
339339
testID,
340340
cancelBtnTestID,
341-
confirmBtnTestID
341+
confirmBtnTestID,
342+
locale
342343
} = this.props;
343344

344345
const dateInputStyle = [
@@ -397,6 +398,7 @@ class DatePicker extends Component {
397398
minuteInterval={minuteInterval}
398399
timeZoneOffsetInMinutes={timeZoneOffsetInMinutes}
399400
style={[Style.datePicker, customStyles.datePicker]}
401+
locale={locale}
400402
/>
401403
</View>
402404
<TouchableComponent
@@ -476,7 +478,8 @@ DatePicker.propTypes = {
476478
placeholder: PropTypes.string,
477479
modalOnResponderTerminationRequest: PropTypes.func,
478480
is24Hour: PropTypes.bool,
479-
getDateStr: PropTypes.func
481+
getDateStr: PropTypes.func,
482+
locale: PropTypes.string,
480483
};
481484

482485
export default DatePicker;

0 commit comments

Comments
 (0)