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

DatePicker is displaying wrong default date #445

Open
ahmadallo1 opened this issue Feb 18, 2021 · 2 comments
Open

DatePicker is displaying wrong default date #445

ahmadallo1 opened this issue Feb 18, 2021 · 2 comments

Comments

@ahmadallo1
Copy link

ahmadallo1 commented Feb 18, 2021

Issue

DatePicker is displaying wrong default date just in March for years greater than 2024

if we select 30-03-2025 and we open the picker the picker is showing 29-03-2025
or
if we select 29-03-2026 and we open the picker the picker is showing 28-03-2026

Expected Behavior

the picker should show same date as the selected date
30-03-2025 ------> 30-03-2025

Code

<DatePicker date={this.state.defaultDate} mode="date" format="YYYY-MM-DD" onDateChange={(date) => { console.log(date); this.setState({ defaultDate: date, }); }} />

Environment

"react-native-datepicker": "^1.7.2",

  1. react-native -v:
  2. node -v:
  3. npm -v:
  4. yarn --version:
  5. target platform: Android | iOS
  6. operating system:
@yoavprat
Copy link

yoavprat commented Apr 8, 2021

+1
have a similar issue, usually on Android

@pandiyanmadhan
Copy link

Its supports toISOString() method in release mode? I got an issue in release mode only. Perfectly working in debug mode apps.

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

No branches or pull requests

3 participants