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

BUG: RangeError: invalid array length #24

Closed
kesylo opened this issue Oct 30, 2023 · 7 comments · Fixed by #27
Closed

BUG: RangeError: invalid array length #24

kesylo opened this issue Oct 30, 2023 · 7 comments · Fixed by #27
Assignees

Comments

@kesylo
Copy link

kesylo commented Oct 30, 2023

Hello @farhoudshapouran
I found this issue when using the library. I just discovered this component and it looks amazing. thanks for working on this.
I followed your docs and the basic example but it crashes when you select a date.

To reproduce:

  • just use the basic example in your docs
  • when the component renders, select a day. it will crash with this error: RangeError: invalid array length

I checked the code a bit, it looks like it comes from the DaySelector function in the utils.ts file

Please if you could look at this, it will be very helpful to me.

Thanks

@kesylo
Copy link
Author

kesylo commented Oct 30, 2023

By the way, I think the library is difficult to find on the web. I think it should have much more visibility

@farhoudshapouran
Copy link
Owner

Hi @kesylo I can't reproduce this error based on the basic example, but I'm trying to find what caused this error.

@farhoudshapouran
Copy link
Owner

By the way, I think the library is difficult to find on the web. I think it should have much more visibility

Thank you for your interest in the library, yes you are right I have to work much more on visibility 👀

@farhoudshapouran farhoudshapouran self-assigned this Oct 31, 2023
@kesylo
Copy link
Author

kesylo commented Oct 31, 2023

Thats weird. I'll try to check if its a problem on my project maybe ? even though I have a pretty basic project. this is the error I get:

ezgif com-video-to-gif

@kesylo
Copy link
Author

kesylo commented Oct 31, 2023

Btw I'm also using expo

@farhoudshapouran
Copy link
Owner

farhoudshapouran commented Oct 31, 2023

Based on the error message, I found that this problem is about the time picker values, the values array must be checked before rendering, and I created a branch to fix it.

@kesylo
Copy link
Author

kesylo commented Oct 31, 2023

Thanks for the quick fix but it caused another issue I think. Now this is what I get

image

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