react-native-datepicker
react-native-datepicker copied to clipboard
Monthnames / shortcuts are shown wrongly (language condition)
Issue
It's correct in the native datepicker in android. So when choosing date, month names are shown in german. However displayname/month shortcut is still in english. Using IOS both modal's and the TextInput's shortcut is in english.
My current format is, as you can see below in the code: 'DD. MMM YYYY'.
Expected Behavior
Itt should show correct month shortcuts, both on modal and textinput. Using in IOS - since it isn't the native DatePicker - the shortcuts are both on modal and textinput in english. I can't find any option to manipulate the monthdates.
Expecting display shortcuts like this: ["Jan","Feb","Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep","Okt","Nov","Dez"]
Code
ref={child => { this.lastPicker=child }}
style={{alignSelf: 'center', marginTop:30, width: 250}}
date={this.state.lastDate}
mode="date"
placeholder="Bis"
format="DD. MMM YYYY"
// minDate="2016-05-01"
// maxDate="2016-06-01"
confirmBtnText="Bestätigen"
cancelBtnText="Abbrechen"
customStyles={{
dateIcon: {
position: 'absolute',
left: 0,
top: 4,
marginLeft: 0
},
dateInput: {
marginLeft: 36
}
}}
onDateChange={(date) => {
this.setState({lastDate: date});
// console.log(date);
}
}
/>
Environment
-
react-native -v: 6.1.0 -
node -v: 8.11.3 -
npm -v: 6.1.0 -
target platform: Android 8 (Huawei MediaPad M5) | iOS 11.4.1 (IPhone SE) <- Both have 'German' as system language. -
operating system: Windows 10
+1