The calendar is blank before it is scrolled
See original GitHub issueThe 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:
- Created 6 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
Yes, sir. It is because I set display to “none” at the beginning. Thanks a lot!