DatePicker #5193
Replies: 25 comments
-
The same problem in clear project. As well not working even in NativeBaseKitchenSink on my android. |
Beta Was this translation helpful? Give feedback.
-
Same issue here. Workaround is to downgrade to v2.13.15 first before this issue is resolved. |
Beta Was this translation helpful? Give feedback.
-
Same problem. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
Will this thread be updated when a fix has been implemented? |
Beta Was this translation helpful? Give feedback.
-
I have yet to see the issue resolved |
Beta Was this translation helpful? Give feedback.
-
When will you fix it? |
Beta Was this translation helpful? Give feedback.
-
Does anyone know how to get around this error? Thx |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
Hi, How do I display the datepicker? I'm currently interested in Android. |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
I tried it and it open a blank screen. Any idea on what is wrong? |
Beta Was this translation helpful? Give feedback.
-
you'll probrably have build problems in android with this approach because the same component will be builded twice |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
Solved 🚀 🚀 Just Reversed back to the old Version from latest to V: 2.13.8 and now it's all working Fine. |
Beta Was this translation helpful? Give feedback.
-
Does anyone know how to have it show date and time rather than just date? |
Beta Was this translation helpful? Give feedback.
-
I have solved this bug by adding value field to DatePicker component.
|
Beta Was this translation helpful? Give feedback.
-
I could make it work by explicit installing
|
Beta Was this translation helpful? Give feedback.
-
NativeBase 3.2.2 docs date picker is mentioned as coming soon. Any timeline for this, when this will be released? |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
### For class component datetimepicker class Productdetails extends Component {
export default React.memo(Productdetails); |
Beta Was this translation helpful? Give feedback.
-
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.
|
Beta Was this translation helpful? Give feedback.
-
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
Beta Was this translation helpful? Give feedback.
All reactions