Error: Exception in HostFunction: Non-whitespace character found after end of conversion: "-07-10T12:51:52.881Z"
Getting the error : Error: Exception in HostFunction: Non-whitespace character found after end of conversion: "-07-10T12:51:52.881Z"
"react": "18.2.0", "react-native": "0.74.1", "react-native-date-picker": "^5.0.4",
I made a fix which works for me. Had the same issue with new architecture enabled on Android https://github.com/henninghall/react-native-date-picker/pull/848
Please provide example code where this issue is reproducible and I'll look into it
Please provide example code where this issue is reproducible and I'll look into it
So the issue happens when using the component with modal={false} and newArchEnabled=true
@henninghall this happens for me with just the default inline example:
import React, { useState } from 'react'
import DatePicker from 'react-native-date-picker'
export default () => {
const [date, setDate] = useState(new Date())
return <DatePicker date={date} onDateChange={setDate} />
}
New architecture enabled. Relevant packages:
"react": "18.2.0",
"react-native": "~0.75.0",
"react-native-date-picker": "^5.0.7",
Facing the same issue while using inline mode with newArchEnabled
Having the same issue (new arch) - @henninghall are there any updates on this one? 🙏 (created dev builds with eas - the issue occurs only on android emulator - on ios it works fine)
Same issue... @henninghall any updates on this one?
Same issue ! @henninghall
same issue here, is there any solution ?
for people get stuck by this error, Badrey made a fix for this. see comments above. To use the fix, edit package.json dependency section to use this line below, and it will pull in Badrey's fix.
"react-native-date-picker": "git+https://github.com/badrey/react-native-date-picker.git#new-arc-fix"
Hi guys I’ll look into this, which device languages is active when this happens?
Hello for me it was French !
Hi guys I’ll look into this, which device languages is active when this happens?
@henninghall FYI for me it was just the default inline example in English.
Same error here! (also french)
@badrey solution is working for me, @henninghall can we consider to integrate it to the next release? Thank you.
i have same issue, is there any solution ??
Same here
Same here. Even with the fix, the app crashes on date change.
@OldsunFlush I had the same issue at first and it was because I forgot to rebuild the app, now it seems to works smoothly even on date change with the fix 👍
I have the same issue and I confirm that patching the package using @badrey's PR worked on my app with the native architecture enabled.
I have been able to reproduce this in new architecture (bridgeless) with expo 52.
I appreciate @badrey 's solution, but unfortunately it is not something we can merge at the moment.
I've made a draft PR of the approach we would need, if anyone got the time, please pick it up from there and complete it. Make it compile and test it out. I will have limited internet access until end of januari but I will be able to review and merge PRs.
Thanks guys!
Indeed, it seems to works after a rebuild!
Having the same issue. Currently using @badrey's solution until this gets fixed upstream.
I applied it as a patch for now to fix it in the new architecture (RN0.76.3), (react-native-date-picker ^5.0.7). (only needed for android, as pointed out)
Step 1:
Edit the package as described in #848, paths:
./node_modules/react-native-date-picker/android/src/main/java/com/henninghall/date_picker/Utils.java
./node_modules/react-native-date-picker/src/DatePickerAndroid.js
Step 2:
Install patch-package
npm install patch-package -D
or via yarn
yarn add patch-package postinstall-postinstall --dev
Step 3:
add the postinstall script in your package.json
"scripts": {
"postinstall": "patch-package"
}
Step 4:
Create the patch file
npx patch-package react-native-date-picker
or
yarn patch-package react-native-date-picker
Step 5:
This will produce a file in your ./patches directory
Step 6:
Apply the patch
npm install or yarn
Step 7:
Add your staged changes
git add .
git commit ...
git push origin ...
I still have the same issue. Can the official release solve this problem? I'm just using it in a simple way. const [date, setDate] = useState(new Date()); <DatePicker date={date} onDateChange={setDate} />
@henninghall I am facing the same error is there any there update regarding that or have to use @badrey 's solution ??
Hi, I used the solution @badrey and it works
I used it this way https://github.com/henninghall/react-native-date-picker/issues/840#issuecomment-2450405601
When will the fix be included in the release?
same issue here, is there any solution ?
for people get stuck by this error, Badrey made a fix for this. see comments above. To use the fix, edit package.json dependency section to use this line below, and it will pull in Badrey's fix. "react-native-date-picker": "git+https://github.com/badrey/react-native-date-picker.git#new-arc-fix"
it worked, thank you
The issue has been resolved in version 5.0.9. Please consider sponsoring the package to support this work 🩷
@henninghall : We still see this issue in the latest version 5.0.10, would really appreciate if the changes are tested in Android device. I appreciate your hardwork and dedication in maintaining this library.