Closed sirlojik closed 8 months ago
Thanks for reporting this. I will have a look at it, meanwhile you can downgrade to the previous version of the package
Thanx for quick reply. I used v4.2.7 and it worked
getting same issue with latest version, please update once it is fixed
Same error, fixed by downgrading to 4.3.7
I had the same issue "react-native": "0.73.5", "react-native-date-picker": "^4.3.7", / tried 4.4.0, 4.2.7 same issue
this error is only reproduced in the Inlined version. The Modal version works well.
Haven't been able to reproduce the issue, but might have a fix ready.
Can someone try version 4.4.1-alpha.0
and let me know if it solved the issue?
@henninghall tried with 4.4.1-alpha.0. having same issue Error: Unsupported top level event type "spinnerStateChange" dispatched, js engine: hermes
@henninghall also downgrades did not work for me.
Haven't been able to reproduce the issue, but might have a fix ready.
Can someone try version
4.4.1-alpha.0
and let me know if it solved the issue?
For me, it works well right now with this alpha version.. thx
@henninghall tried with 4.4.1-alpha.0. having same issue Error: Unsupported top level event type "spinnerStateChange" dispatched, js engine: hermes
Did you rebuild the app?
deleted evey cache file and removed node_modules and yarn.lock. Now it works with the alpha version. 👍
same here
deleted evey cache file and removed node_modules and yarn.lock. Now it works with the alpha version. 👍
this dont work for me.
Im using this version: "react-native-date-picker": "^4.1.3"
My code onDateChange
prop just call setDate
to handle view state.
This has always worked, but in the last build, I noticed some crash logs triggering this error in production, for example:
const initialValue = "2024-03-10T16:00:27.218Z";
const FooComponent = () => {
const [date, setDate] = useState(new Date(initialValue ?? ''));
return <View>
<DatePicker date={date}
mode='date'
androidVariant='iosClone'
onDateChange={setDate}
fadeToColor='none'
textColor={theme.colors.fontPrimary}
style={{ width, backgroundColor: theme.colors.card }} />
</View>
}
export default FooComponent;
Haven't been able to reproduce the issue, but might have a fix ready.
Can someone try version
4.4.1-alpha.0
and let me know if it solved the issue?
I can confirm it working in 4.4.1-alpha.0. Will be running this until a new version is released.
I can also verify that 4.4.1-alpha.0 works without any problem.
I used v4.2.7 and it worked for me
i am using npm i react-native-date-picker@4.3.7 then fixed my issue
i try every solution @aishevdt12 @Chbilalramzan @alperpacin @Luckfried but not working .can you @henninghall provide me another solution.
In version 4.4.1 this is still an issue, the error doesnt happen on version 4.3.7 and below
getting same error even after upgrading to alpha version
Error: Unsupported top level event type "spinnerStateChange" dispatched, js engine: hermes
@MeAbhinavsharma @hamxahussain you need to check the react-native version of your project then choose the version of react-native-date-picker respectively. May be then it will work.
@MeAbhinavsharma @hamxahussain you need to check the react-native version of your project then choose the version of react-native-date-picker respectively. May be then it will work.
yeah the alpha version works every where accept with old react native, which I made a tiny mistake in linking, Thanks now its working
@hamxahussain I'm pleased to hear that it's working for you.
Is the fix pushed as of now?
@MeAbhinavsharma @hamxahussain you need to check the react-native version of your project then choose the version of react-native-date-picker respectively. May be then it will work.
I am still getting this issue on 4.4.1. How do I know what version of react-native I need? (I am using 0.71.13)
The React Native Version doesn't matter as far as I know, But the "react-native-date-picker": "^4.4.1"
matters, Try running these commands, then checkout that helps are not.
yarn add react-native-date-picker@4.4.1-alpha.0
yarn start --reset-cache
yarn android
OR yarn ios
Thanks, I thought the fix was included in 4.4.1. Hope it will make it into 4.4.2.
The fix did not make it into 4.4.1. Now version 4.4.2 is released, could anyone with the error test it out? (remember to rebuild)
4.4.2 is resolving the issue for me. Thanks for the fix !
Describe the bug I am using an inline component as shown in code but when selecting date i get the error above "Error: Unsupported top level event type "spinnerStateChange" dispatched"
To Reproduce <DatePicker mode={'date'} androidVariant="iosClone" date={new Date()} onDateChange={(date) => { console.log(date) setStartDate(date); }} />