Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View config getter callback for component RNDateTimePicker must be a function (received undefined) #867

Open
AFDHAL2009 opened this issue Mar 6, 2024 · 1 comment

Comments

@AFDHAL2009
Copy link

AFDHAL2009 commented Mar 6, 2024

👋 Hi!
I tried to use this picker in snack for test https://snack.expo.dev/ ,android working fine but ios it show this errors, can some help us to solve this issue and thanks
View config getter callback for component RNDateTimePicker must be a function (received undefined)

this simple test code for reproduce

import DateTimePicker from '@react-native-community/datetimepicker';
const App = () => {
  const [date, setDate] = useState(new Date(1598051730000));
return (
<View style={{flex:1}}>
<DateTimePicker
          testID="dateTimePicker"
          value={date}
          mode={'date'}
          is24Hour={true}
          onChange={() => alert('changed')}
        />
</View> 
}
export default App;

image

@CodingEloise
Copy link

CodingEloise commented Mar 19, 2024

Hi, I have also encountered the same problem. My solution was to update the @react-native-community/datetimepicker dependency in package.json to the latest version, 7.6.3, and then the error disappeared. Although Snack indicates that it is not the recommended version for SDK 50.0.0, it does not affect the normal operation of the program.
{
"dependencies": {
"@react-native-community/datetimepicker": "7.6.3",
}
}
Hope it can help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants