Comments (12)
Need to reopen this issue as its still persist
Having the same issue only on Android with mode "date"
if you try to add the minimumDate props with mode "date" on android App is crashed
working fine on Ios and also working fine with other mode like datetime,time
this will only happen if we passed minimumDate prop on date mode (Android)
"react-native-modal-datetime-picker": "^9.0.0",
"react-native": "0.63.3",
from react-native-modal-datetime-picker.
Hi!
What version of RN are you using? Does the bug happens on both iOS and Android?
It sounds more like a bug of react-native's own pickers, could you try to use them and see if they work correctly?
Thanks!
from react-native-modal-datetime-picker.
Hi,
I use react native 0.43.3
it crashes on both android and ios
when i setted datePickerModeAndroid as spinner works fine on android
also the default react native datePicker android works fine with both calendar and spinner with minDate
I didn't try it yet on ios after i setted datePickerModeAndroid
from react-native-modal-datetime-picker.
Does the following example work for you?
Here I'm setting minimumDate
with the last picked date from the picker and it is working fine for me (iOS). 🤔
import React, { Component } from 'react';
import { Text, TouchableOpacity, View } from 'react-native';
import DateTimePicker from 'react-native-modal-datetime-picker';
import styles from './app.style';
export default class DateTimePickerTester extends Component {
state = {
isDateTimePickerVisible: false,
minimumDate: new Date(),
};
_showDateTimePicker = () => this.setState({ isDateTimePickerVisible: true });
_hideDateTimePicker = () => this.setState({ isDateTimePickerVisible: false });
_handleDatePicked = date => {
console.log('A date has been picked: ', date);
// Setting the minimumDate as the last picked date
this.setState({ minimumDate: date });
this._hideDateTimePicker();
};
render() {
return (
<View style={styles.container}>
<TouchableOpacity onPress={this._showDateTimePicker}>
<View style={styles.button}>
<Text>Show DatePicker</Text>
</View>
</TouchableOpacity>
<DateTimePicker
isVisible={this.state.isDateTimePickerVisible}
onConfirm={this._handleDatePicked}
onCancel={this._hideDateTimePicker}
minimumDate={this.state.minimumDate}
/>
</View>
);
}
}
from react-native-modal-datetime-picker.
Try with setting maximumDate with minimumDate
from react-native-modal-datetime-picker.
my code works on ios and android after i setted datePickerModeAndroid as spinner
from react-native-modal-datetime-picker.
Try with setting maximumDate with minimumDate
I did, it's working fine.
my code works on ios and android after i setted datePickerModeAndroid as spinner
That's weird, because datePickerModeAndroid
is not even checked by iOS, maybe it was a caching issue?
from react-native-modal-datetime-picker.
My code still gives error when I remove datePickerModeAndroid on android and ios
but I can't reproduce and I tried Your code is working fine
I tried it with resetting minimumDate dynamically and also work fine
so thank You a lot if You want You can close this issue
from react-native-modal-datetime-picker.
Feel free to re-open if you'll be able to reproduce it!
from react-native-modal-datetime-picker.
Hello, @arabscimitar Actually I am using this module .
My ```
"react": "16.0.0-alpha.12",
"react-native": "0.46.1",
But,
you are saying that to change react-native version 0.43.3.
But I am using another module
urban airship But it's accepts react-native-version>= 0.44.0,
what can I do But i want to show an ,
datePickerModeAndroid={'spinner'}
from react-native-modal-datetime-picker.
i could not reproduce i am not sure why it is happens
from react-native-modal-datetime-picker.
But I want Spinner Mode in android but it shows default mode
from react-native-modal-datetime-picker.
Related Issues (20)
- iOS keyboard input for mode="time" breaks the UI HOT 3
- Native module RNDatePicker tried to override RNDatePicker
- Customizing Background and Text Color in Android with Expo HOT 2
- Minimum and maximum time is not working on android but working for ios
- MinuteInterval time return current time in ios , android working fine
- `onHide` callback doesn't return a valid Date
- timeZoneOffsetInMinutes` is deprecated and will be removed in a future release. Use `timeZoneName` instead.
- Datepicker is not visible on iOS HOT 1
- Can't see the text in the picker modal (iOS) HOT 1
- Missing peerDependency on React
- how can only use it as only Month and year picker
- react-native-modal-datetime-picker(^17.1.0) is not showing on iOS 17.3.1 HOT 1
- Exception in HostFunction: Malformed calls from JS: field sizes are different.
- Can't install in react-native 0.74 using NPM I HOT 1
- Dark Mode is not working on Android devices.
- Time Zone Issue HOT 1
- WARN: `defaultProps` will be removed from memo components HOT 3
- isDarkModeEnabled doesn't work on spinner in iOS
- how to add a custom header in Android
- WARN: defaultProps will be removed from memo components
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-modal-datetime-picker.