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.

Android crash RangeError: Date value out of bounds.

See original GitHub issue

Describe the bug I added the DatePicker with date mode component and used date as state, when the component is rendered the app crashes with RangeError: Date value out of bounds. Source Error: DatePickerAndroid.js retrun addMinutes(…)

Expected behavior I expect the app not to crash.

To Reproduce Add example code that reproduces the behavior.

<DatePicker
              date={date}
              androidVariant="iosClone"
              onDateChange={responseDate => {
                setDate(new Date(responseDate));
              }}
              mode={'date'}
              textColor={Color.PINK}
            />

Smartphone (please complete the following information):

  • OS: [Android]
  • React Native version [e.g. 0.65.1]
  • react-native-date-picker version [e.g. ^4.1.0]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
henninghallcommented, Jul 15, 2022

This Hermes bug is tracked here https://github.com/facebook/hermes/issues/647. It is not related to this library.

1reaction
jtvargascommented, Jan 13, 2022

Update: I found that disabling Hermes in RN 0.65 fixed the issue… but is not the preferred solution

Read more comments on GitHub >

github_iconTop Results From Across the Web

RangeError: Invalid time value - javascript - Stack Overflow
This exception occurs when the Date object contains an invalid date. new Date('undefined').toISOString(). In this example the Date object ...
Read more >
RangeError: Invalid time value in JavaScript - bobbyhadz
The "Uncaught RangeError Invalid time value" error occurs when calling a method on an invalid date, e.g. `new Date('asdf').toISOString()`.
Read more >
Getting "ssid bytes size out of range" error on Android 10 if ...
The error message is caused by SSIDs containing more than 32 bytes. According to the Wikipedia,. Unlike basic service set identifiers, ...
Read more >
CWE-787: Out-of-bounds Write (4.9)
The software writes data past the end, or before the beginning, of the intended buffer. ... Typically, this can result in corruption of...
Read more >
[Solved]-Realm Array Index out of range - appsloveworld
Can the Accelerate Framework aggregate array values based on a separate index array? ... Realm is crashing iOS app: 'RLMException', reason: 'Index 38...
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