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.

Passing a dateHeader component breaks month view when navigating

See original GitHub issue

Do you want to request a feature or report a bug?

Bug

What’s the current behavior?

If I pass a dateHeader component to the calendar, the month view throws the following error when navigating (using the back/next buttons):

Cannot read property '0' of undefined

For some reason (haven’t had time to investigate yet) the length of weeks is 0.

This can be seen in the “custom date header” example in storybook.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:7

github_iconTop GitHub Comments

15reactions
STEVEOO6commented, Feb 20, 2018

@berryman17 defaultDate={new Date()}

6reactions
KerenChandrancommented, Feb 9, 2018

@jquense I was also experiencing this issue and noticed that in the handleNavigate handler, the date calculated by moveDate is invalid. To fix this issue, I set defaultDate to the current date and everything works seems to work as expected.

Do you have any thoughts as to why this might be the case? I quickly debugged the issue and can try spending some time this weekend trying to further understand what’s going on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pass Params from screen to Header component react navigation
js, I want to pass savefilters to headerRight which is in navigation.js. I can view the save param in log-1. But Why can't...
Read more >
Javascript Calendar Customizing the header Example
Javascript calendar with customizable header for moving navigation elements, arrows, adding today button, week/month switch .
Read more >
Views in Blazor Scheduler Component | Syncfusion
A Timeline Month view displays the current month days along with its appointments. ... Clicking on the dates in the date header bar...
Read more >
Creating a Custom Calendar Control for iOS - Kodeco
Three components make up the calendar control: Green, Header view: Shows the current month and year, allows the user to close the picker...
Read more >
React custom datepicker: Step-by-step - LogRocket Blog
getMonth() + 1, year: _date.getFullYear(), }); }; const getCalendarDates = () => { const { current, month, year } = dateState; const ...
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