I installed @react-native-community/datetimepicker after which my app is crashing on launch even on debug mode. I uninstalled and re-installed the library though still getting the same. Not able to figure out the error.
Do the following:
Open Android Studio, and check for debug logs in Logcat (make sure you select your debuggable process)
If you do not find any error there, do the following:
1. Run fresh: react-native run-android
2. Reset cache: react-native start --reset-cache
cd android
—> ./gradlew clean
use native base datepicker
install nativebase
npm i nativebase --save
then import datePicker from nativebase
import {DatePicker} from 'native-base';
<DatePicker
defaultDate={new Date(2018, 4, 4)}
minimumDate={new Date(2018, 1, 1)}
maximumDate={new Date(2018, 12, 31)}
locale={"en"}
timeZoneOffsetInMinutes={undefined}
modalTransparent={false}
animationType={"fade"}
androidMode={"default"}
placeHolderText="Select date"
textStyle={{ color: "green" }}
placeHolderTextStyle={{ color: "#d3d3d3" }}
onDateChange={this.setDate}
disabled={false}
/>
for complete guide this link will help you https://docs.nativebase.io/Components.html#date-picker-def-headref
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.