question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Picking a date earlier than 1960 results in 20XX

See original GitHub issue

Tested on Android.

  1. Create a component androidMode="spinner" (It’s very hard to pick older dates without the spinner)
  2. Set date format to something like “MMMM Do, YYYY”
  3. Pick the date 1965.

The date now shows as 2065 instead of 1965. The problem is purely visual however. When I inspect onDateChange I see the 1965 date selected. I am unsure if the behavior is reproducible in ios or not.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
jnrepocommented, Jun 5, 2017

@bufke

If you haven’t found a solution. I was looking through their code and found this https://github.com/xgfe/react-native-datepicker/blob/master/index.js#L152

this worked for me:

<DatePicker minDate={'1920-01-01'} maxDate={'2017-01-01'} format={'YYYY-MM-DD'} />
0reactions
qamoonsitecommented, Mar 6, 2018

any solution?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Excel works with two-digit year numbers - Office
Describes how Microsoft Excel determines the century when you type a date using a two-digit year number.
Read more >
Solved: need to calculate age for people born before 1960
The most likely issue is that your dates had 2-digit years and when you read them the YEARCUTOFF option assumed the dates you...
Read more >
pandas to_datetime parsing wrong year - Stack Overflow
The %y two digits can only go from 00 to 99 which is going to be ambiguous if we start crossing centuries. If...
Read more >
Markets and government before, during and after the 2007 ...
Markets and government before, during and after the 2007-20xx crisis ... and it lacks precise dates, because we do not see its end....
Read more >
Completing and Using Schedule P - Casualty Actuarial Society
Only after the third major effort before the NAIC Blanks Committee was I able to get ... ABC's GAAP financial statements show no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found