web-ridge / react-native-paper-dates

Smooth and fast cross platform Material Design date and time picker for React Native Paper
https://www.reactnativepaperdates.com
MIT License
667 stars 172 forks source link

Add DD/MM/YYYY support for entering dates #122

Closed ethan1141 closed 2 years ago

ethan1141 commented 2 years ago

Can you change MM/DD/YYYY to local date formate of DD/MM/YYYY? Screen Shot 2021-12-19 at 8 27 53 pm

RichardLindhout commented 2 years ago

Provide the right locale and it will automatically change.

ethan1141 commented 2 years ago

Thanks for replying

What is the right locale for DD/MM/YYYY I could only find DD.MM.YYYY which is uk which is nearly what I want.

Grijnak commented 2 years ago

Try the canadian locale "ca"

RichardLindhout commented 2 years ago

Please use the locale of your country. And make a PR with the translations! It should work automatically. I don't want to support custom format since I would like it to be automatic based on the locale :)

ethan1141 commented 2 years ago

Thanks everyone for your answers. i did the locale of 'ca'

ethan1141 commented 2 years ago

Please use the locale of your country. And make a PR with the translations! It should work automatically. I don't want to support custom format since I would like it to be automatic based on the locale :)

As soon as i know how to do that i will take out a PR

RichardLindhout commented 2 years ago

Instructions are in the readme, but maybe it's the same as the english translations so maybe only a README.md change

import {
  // en,
  // nl,
  // pl,
  enGB,
  registerTranslation,
} from 'react-native-paper-dates'
// registerTranslation('en', en)
++ // registerTranslation('ca', en)
// registerTranslation('nl', nl)
// registerTranslation('pl', pl)
// registerTranslation('pt', pt)
registerTranslation('en-GB', enGB)
ethan1141 commented 2 years ago

Instructions are in the readme, but maybe it's the same as the english translations so maybe only a README.md change

import {
  // en,
  // nl,
  // pl,
  enGB,
  registerTranslation,
} from 'react-native-paper-dates'
// registerTranslation('en', en)
++ // registerTranslation('ca', en)
// registerTranslation('nl', nl)
// registerTranslation('pl', pl)
// registerTranslation('pt', pt)
registerTranslation('en-GB', enGB)

how do i replace the date format to local date of DD/MM/YYYY, i registered the locale of 'au'

ethan1141 commented 2 years ago

Screen Shot 2021-12-24 at 1 42 26 pm reopened this issue 'ca' is the right date format but the translations are off, need to be 'en' translations. So far i registered 'au' locale but the date format has me stumped on how to change it

RichardLindhout commented 2 years ago

Then register ‘ca’ with English import

Op vr 24 dec. 2021 om 03:44 schreef Ethan Russell @.***>

[image: Screen Shot 2021-12-24 at 1 42 26 pm] https://user-images.githubusercontent.com/53418441/147309364-4851d8f3-a023-45fd-8a1d-eb2c5de1f4c7.png reopened this issue 'ca' is the right date format but the translations are off, need to be 'en' translations. So far i registered 'au' locale but the date format has me stumped on how to change it

— Reply to this email directly, view it on GitHub https://github.com/web-ridge/react-native-paper-dates/issues/122#issuecomment-1000619340, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRRARISHWYATTWYFVVYTGTUSPNCNANCNFSM5KLVMSBQ . You are receiving this because you commented.Message ID: @.***>

--

Richard Lindhout | Eigenaar Bel mij +31 6 43 42 45 67 <+31643424567>

[image: logo webridge]

Beatrixlaan 2, 4694EG Scherpenisse

KVK 56845367 BTW NL002365659B60 IBAN NL93 BUNQ 2038 9661 33 WEB webRidge.nl https://webridge.nl/