@@ -57,7 +57,7 @@ npm install react-native-paper-dates --save
5757
5858## Import some localized strings
5959Ideally you do this somewhere in your ` index.js ` before ` react-native-paper-dates ` is used.
60- Currently we have en/nl/de/pl/pt translations but it's really easy to add one extra since it are only some labels and error messages.
60+ Currently we have en/nl/de/pl/pt/ar translations but it's really easy to add one extra since it are only some labels and error messages.
6161
6262``` tsx
6363// e.g in your index.js
@@ -67,6 +67,7 @@ import {
6767 // de,
6868 // pl,
6969 // pt,
70+ // ar,
7071 enGB ,
7172 registerTranslation ,
7273} from ' react-native-paper-dates'
@@ -75,6 +76,7 @@ import {
7576// registerTranslation('pl', pl)
7677// registerTranslation('pt', pt)
7778// registerTranslation('de', de)
79+ // registerTranslation('ar', ar)
7880registerTranslation (' en-GB' , enGB )
7981```
8082
@@ -153,6 +155,9 @@ export default function ReadMeExampleSingle() {
153155 // animationType="slide" // optional, default is 'slide' on ios/android and 'none' on web
154156 // startYear={2000} // optional, default is 1800
155157 // endYear={2100} // optional, default is 2200
158+ // closeIcon="close" // optional, default is "close"
159+ // editIcon="pencil" // optional, default is "pencil"
160+ // calendarIcon="calendar" // optional, default is "calendar"
156161 />
157162 </>
158163 );
@@ -213,6 +218,9 @@ export default function ReadMeExampleRange() {
213218 // animationType="slide" // optional, default is slide on ios/android and none on web
214219 // startYear={2000} // optional, default is 1800
215220 // endYear={2100} // optional, default is 2200
221+ // closeIcon="close" // optional, default is "close"
222+ // editIcon="pencil" // optional, default is "pencil"
223+ // calendarIcon="calendar" // optional, default is "calendar"
216224 />
217225 </>
218226 );
@@ -269,6 +277,7 @@ export default function ReadMeExampleMultiple() {
269277 // animationType="slide" // optional, default is slide on ios/android and none on web
270278 // startYear={2000} // optional, default is 1800
271279 // endYear={2100} // optional, default is 2200
280+ // closeIcon="close" // optional, default is "close"
272281 />
273282 </>
274283 );
@@ -289,6 +298,7 @@ export default function ReadMeExampleDatePickerInput() {
289298 onChange = { (d ) => setInputDate (d )}
290299 inputMode = " start"
291300 // mode="outlined" (see react-native-paper docs)
301+ // calendarIcon="calendar" // optional, default is "calendar"
292302 // other react native TextInput props
293303 />
294304 </>
@@ -332,6 +342,8 @@ export default function TimePickerPage() {
332342 confirmLabel = " Ok" // optional, default: 'Ok'
333343 animationType = " fade" // optional, default is 'none'
334344 locale = " en" // optional, default is automically detected by your system
345+ // keyboardIcon="keyboard-outline" // optional, default is "keyboard-outline"
346+ // clockIcon="clock-outline" // optional, default is "clock-outline"
335347 />
336348 <Button onPress = { ()=> setVisible (true )} >
337349 Pick time
@@ -387,6 +399,8 @@ or npm
387399npm install react-native-localize @formatjs/intl-pluralrules @formatjs/intl-getcanonicallocales @formatjs/intl-listformat @formatjs/intl-displaynames @formatjs/intl-locale @formatjs/intl-datetimeformat @formatjs/intl-numberformat @formatjs/intl-relativetimeformat --save
388400```
389401
402+ If using Expo, omit ` react-native-localize ` and use ` expo install expo-localization ` instead. Read more [ here] ( https://docs.expo.dev/versions/latest/sdk/localization/#installation ) .
403+
390404In your app starting entrypoint e.g. ` ./index.js ` or even better use a ` index.android.js ` to prevent importing on iOS/web put the following code. (don't forget to import the languages you want to support, in the example only english language is supported)
391405
392406``` javascript
0 commit comments