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
657 stars 170 forks source link

Manual date input is expecting the date to be in MM/1/YYYY format. #123

Closed napzZztar closed 2 years ago

napzZztar commented 2 years ago

I think the problem I'm facing might be related to Issue#63.

The problem is, when I click on manual date edit button the format shown here is MM/1/YYYY which doesn't make any sense to me.

Also, if I try to insert a date in MM/DD/YYYY format using keyboard, the module automatically inserts a /after the third input digit. So, basically if I type 0102 it becomes 01/0/.

RichardLindhout commented 2 years ago

Which versions do you have of React Native? Which locale is configured?

RichardLindhout commented 2 years ago

It should work automatically based on locale (Intl API's support this)

napzZztar commented 2 years ago

I'm using Expo SDK: 42.0.0 which uses React Native 0.63.

varunhhhrahul commented 2 years ago

I am experiencing the same issue, is there any fix yet?

RichardLindhout commented 2 years ago

Do you use the formatjs polyfill of the Readme? I think Expo & RN 0.63 has still no Hermes with Intl support unfortunaly :(

napzZztar commented 2 years ago

@RichardLindhout , thanks!! This resolved it for me. As, I'm using expo, I had to use expo-localization instead of react-native-localize.

ankitfyntune commented 1 year ago

@RichardLindhout , thanks!! This resolved it for me. As, I'm using expo, I had to use expo-localization instead of react-native-localize.

@napzZztar please help, I face same issue.