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

Fix android time picker returning today's date instead of the given date #115

Conversation

roconnorr
Copy link

@roconnorr roconnorr commented Feb 11, 2020

Summary

After a time value is chosen in the android picker, use the value prop to create the date object so it doesn't default to returning the current date when using the time picker. Closes #94

Test Plan

What's required for testing (prerequisites)?

A test project for android with a time picker set to mode="time"

What are the steps to reproduce (after prerequisites)?

Pass the time picker a date that is not today, log the value returned from the picker after selecting a time, and see that it returns today's date.

Compatibility

OS Implemented
iOS
Android

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md - not applicable for bug fix
  • I mentioned this change in CHANGELOG.md
  • I updated the typed files (TS and Flow) - not applicable for bug fix
  • I added a sample use of the API in the example project (example/App.js) - not applicable for bug fix

Rory O'Connor added 2 commits February 12, 2020 09:19
…create the date object so it doesn't default to returning the current date when using the time picker. Fixes issue react-native-datetimepicker#94
CHANGELOG.md Outdated Show resolved Hide resolved
@luancurti luancurti merged commit 1ebc8ed into react-native-datetimepicker:master Feb 13, 2020
@A4TIF
Copy link

A4TIF commented Mar 20, 2020

This issue has not been fixed still. Using the latest v 2.3.0, On setting time, the date still changes to the current date.

@lander854
Copy link

same here

@A4TIF
Copy link

A4TIF commented Mar 29, 2020

@roconnorr - kindly look into this issue again. The issue is still not resolved. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong value returned from picker
4 participants