react-native-date
react-native-date copied to clipboard
Invariant violation (iOS - React-Native 0.17)
Installed successfully with NPM. Imported as:
var DatePicker = require('react-native-fate-time-picker')
and added to my main view:
<View>
<DatePicker/>
</View>
getting this error:
Element Type is invalid: expected a string (for built-in components) or a class function (for composite components) but got: object. Check the render method of exports.
I haven't tried with Android yet until I know it works on iOS too.
Thanks!
This module is just for Android DatePicker. For ios you can use the "native" DatePickerIOS.
By the way, to import the module you just have to add "NativeModules" to:
var {
. . .
NativeModules,
} = React;