datetimepicker
datetimepicker copied to clipboard
[react-native-windows] English month names on Polish Windows
Bug report
Summary
The application with DateTimePicker
is running on Polish Windows 10. The name of selected month is in English instead of Polish language.
Reproducible sample code
import React, {type PropsWithChildren, useState} from 'react';
import {
SafeAreaView,
ScrollView,
StatusBar,
StyleSheet,
Text,
useColorScheme,
View,
} from 'react-native';
import {
Colors,
DebugInstructions,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
import { Picker } from '@react-native-picker/picker';
import DateTimePicker from "@react-native-community/datetimepicker"
const App = () => {
const [date, setDate] = useState(new Date());
return (
<SafeAreaView>
<ScrollView
contentInsetAdjustmentBehavior="automatic">
<View style={{flex: 2}}>
<DateTimePicker
locale={"pl-PL"}
testID="dateTimePicker1"
value={date}
mode="date"
is24Hour={true}
display="default"
dateFormat="day month year"
onChange={(event, d) => setDate(d)}
/>
</View>
</ScrollView>
</SafeAreaView>
);
};
export default App;
Steps to reproduce
- Run above sample code on MS Windows 10 with Polish language set.
Describe what you expected to happen:
- The name of the month is presented in Polish language when DateTimePicker is closed
- The name of the month is presented in Polish language when DateTimePicker is clicked by user to pick date.
Environment info
npx react-native info
output:
System:
OS: Windows 10 10.0.19043
CPU: (24) x64 Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz
Memory: 36.35 GB / 63.96 GB
Binaries:
Node: 14.17.5 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.14 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
Versions: 10.0.18362.0, 10.0.19041.0
IDEs:
Android Studio: Version 2020.3.0.0 AI-203.7717.56.2031.7621141
Visual Studio: 16.11.32228.343 (Visual Studio Community 2019)
Languages:
Java: 1.8.0_171 - C:\Program Files\Java\jdk1.8.0_171\bin\javac.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.0.0
react-native: 0.69.5 => 0.69.5
react-native-windows: 0.69.6 => 0.69.6
npmGlobalPackages:
*react-native*: Not Found
datetimepicker version: 6.3.2
Windows version: 10 10.0.19043