Skip to content
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

DatePickerIOS Date Props issue in release build #22912

Closed
MuhammadUzair opened this issue Jan 8, 2019 · 6 comments
Closed

DatePickerIOS Date Props issue in release build #22912

MuhammadUzair opened this issue Jan 8, 2019 · 6 comments
Labels
Bug Component: PickerIOS Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@MuhammadUzair
Copy link

MuhammadUzair commented Jan 8, 2019

Environment

React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (4) x64 Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz
Memory: 33.43 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.11.3 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 5.6.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 26.0.3, 27.0.3, 28.0.2
System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-24 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.57.8 => 0.57.8
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
react-native-image-picker: 0.26.10

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.4 => 0.55.4

Description

Date props not show Specify (defined Initial date ) date in picker.In debug build it work fine but in release build picker show today date.
Mobile OS=IOS

Reproducible Demo code

import {View,DatePickerIOS} from 'react-native';

<View style={{flex: 1, justifyContent: 'center'}}>
<DatePickerIOS
date={new Date('12-30-1980')}
onDateChange={this.setDate}
mode="date"
/>

@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.

The "⏪Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@uzairkhan01
Copy link

Also tried with new version but facing issue.In new version, issue in debug build also

react-native info

React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (4) x64 Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz
Memory: 33.43 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.11.3 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 5.6.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 26.0.3, 27.0.3, 28.0.2
System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-24 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.57.8 => 0.57.8
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
react-native-image-picker: 0.26.10

@MuhammadUzair
Copy link
Author

Still exist in new version

@ericlewis
Copy link
Contributor

ericlewis commented Apr 18, 2019

@MuhammadUzair new Date('12-30-1980') isn't a valid date, so it returns undefined. If you would like to parse dates like this, I would suggest checking out moment. It works in debug mode because the JSC is different.

@MuhammadUzair
Copy link
Author

MuhammadUzair commented Apr 18, 2019

@ericlewis For the moment what date format is required for DatePickerIOS Date Props (like DD/MM/YYYY)?

@MuhammadUzair
Copy link
Author

MuhammadUzair commented Apr 22, 2019

Thanks @ericlewis .I Fixed this issue by change the date format in YYY-MM-DD .

@facebook facebook locked as resolved and limited conversation to collaborators Apr 18, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: PickerIOS Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants