-
Notifications
You must be signed in to change notification settings - Fork 2.4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
DatePicker #3381
Comments
The same problem in clear project. As well not working even in NativeBaseKitchenSink on my android. |
Same issue here. Workaround is to downgrade to v2.13.15 first before this issue is resolved. |
Same problem. |
this is not working cause when they changed the deprecated components DatePickerAndroid and DatePickerIOS they didn't verified the different fields that have in the community solution |
Will this thread be updated when a fix has been implemented? |
I have yet to see the issue resolved |
When will you fix it? |
Does anyone know how to get around this error? Thx |
Hey guys! A beginner to React Native stuff here! I found a fix and have uploaded a fixed version of the package on the npm platform if you need to fix this issue on your apps quickly. All you need to do is:
The problem is most likely related to the date time picker being used in the package does not set any date value for the |
This small fix fixes [this](GeekyAnts#3381) issue. The problem is that the default date set was only for the `date` attribute which is deprecated. The fix is to add the default date for the `value` attribute too.
Hi, How do I display the datepicker? I'm currently interested in Android. |
Hm.. not sure about that. I'm implementing the date picker as per the documentation, and the datepicker shows just fine. However, I only tested the datepicker on iOS. Could you perhaps give a picture/video of your issue? |
Hey guys, finaly i resolved this by check document in @react-native-community/datetimepicker repo.
this is my edit and allready check in IOS, not yet in Android import { Text, DatePicker } from 'native-base';
import React, { useState } from 'react';
import { StyleSheet, View } from 'react-native';
const InputDateTime = () => {
const [datevalue, setDate] = useState(new Date());
const _onDateChange = (e, newDate) => {
setDate(newDate);
};
return (
<View>
<DatePicker
defaultDate={new Date(2021, 4, 4)}
minimumDate={new Date(2021, 1, 1)}
maximumDate={new Date(2021, 12, 31)}
locale={'en'}
timeZoneOffsetInMinutes={undefined}
modalTransparent={false}
animationType={'fade'}
androidMode={'default'}
placeHolderText="Select date"
textStyle={{ color: 'green' }}
placeHolderTextStyle={{ color: '#d3d3d3' }}
disabled={false}
onChange={_onDateChange}
value={datevalue}
/>
<Text>{datevalue.toString().substr(4, 12)}</Text>
</View>
);
};
export default InputDateTime; I hope it will help you guys |
I tried it and it open a blank screen. Any idea on what is wrong? |
you'll probrably have build problems in android with this approach because the same component will be builded twice |
Hello, I'm having the same issue on Android with the message UPDATE: "Solved" by installing v2.13.15 of native-base. But some dependecies are deprecated anyway. UPDATE: Actually, there may be some issues with autolinking on projects that started with a quite old version of react-native and upgraded to a version with autolinking (0.49 for the one I'm working on). You'll have to link manually |
Solved 🚀 🚀 Just Reversed back to the old Version from latest to V: 2.13.8 and now it's all working Fine. |
Does anyone know how to have it show date and time rather than just date? |
I have solved this bug by adding value field to DatePicker component.
|
I could make it work by explicit installing
|
NativeBase 3.2.2 docs date picker is mentioned as coming soon. Any timeline for this, when this will be released? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
### For class component datetimepicker class Productdetails extends Component {
export default React.memo(Productdetails); |
This happens when you cancel the picker instead of selecting a new date, it sets the date's value to an undefined value, the solution is the check the event of the onChange function and set it to the previous date state if dismissed eg.
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I have gone through these following points
Issue Description
I want to use the DatePicker to get the time, but when I click on it, it shows the error
Steps to reproduce
import {DatePicker} from 'native-base';
<DatePicker
locale={"en"}
value={new Date()}
timeZoneOffsetInMinutes={undefined}
modalTransparent={false}
animationType={"fade"}
androidMode={"default"}
textStyle={{ color: 'black' }}
placeHolderTextStyle={{ color: 'black' }}
placeHolderText="wew"
disabled={false}
/>
Is the bug present in both iOS and Android
error message
The text was updated successfully, but these errors were encountered: