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.

The calendar is blank before it is scrolled

See original GitHub issue

The code below works well, except a small bug.

The initial value of this.state.selectedDates is set to [Date.now()]. The calendar is blank before you scroll the calendar. If you scroll, the calendar appears, but you need to scroll from year 1980.

If you click the date in the calendar header, the calendar can auto scroll to today. How can I trigger this event when the component is mounted, please? Thanks a lot!

import {Calendar, defaultMultipleDateInterpolation} from 'react-infinite-calendar';
const MultipleDatesCalendar = withMultipleDates(Calendar);

render() {
  return (
    <MultipleDatesCalendar
      selected={this.state.selectedDates}
      onSelect={(selectedDate) => defaultMultipleDateInterpolation(selectedDate, this.state.selectedDates)}                                                                                                   
    />
  );
}

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
claudericcommented, Mar 28, 2017

I’m unable to reproduce what you’re describing.

Are you animating the display property of the Calendar and are you sure it has a height initially? If the header is properly displaying the selected date, I could be wrong, but this sounds like more of an implementation an issue on your end where the Calendar is trying to scrollTo the selected date but can’t because it doesn’t have a height or is set to display none.

1reaction
jiezhou0731commented, Mar 28, 2017

Yes, sir. It is because I set display to “none” at the beginning. Thanks a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

outlook Calendar Scrolling issues - Microsoft Community
When I do a 2 finger scroll on my touchpad in Outlook Calendar Desktop the calendar goes blank and does't scroll.
Read more >
Calendar scrolling not working - Apple Support Communities
Open system preferences > Accessibility > select Mouse and trackpad > Trackpad Options check the box of scrolling and click on drop down...
Read more >
CalendarList - blank space instead of month when scrolling ...
If scrolling quickly through CalendarList. Month appears as blank space. Observed Behavior. No error, just blank space instead of month,.
Read more >
calendar issue inside scrolling div - JBoss.org
when i scroll down in the div, the calendars have an issue, they no longer detect the presence of the clic inside them....
Read more >
Office365 calendar lags when scrolling in month View
The best way to describe this issue is when you are in the month view of the calendar within Outlook, it takes a...
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