react-infinite-calendar icon indicating copy to clipboard operation
react-infinite-calendar copied to clipboard

Calendar does not renrer dates

Open futbolistua opened this issue 7 years ago • 3 comments

I use Range Selection and calendar does not render dates till scrolling if it has more than one available month <InfiniteCalendar Component={withRange(Calendar)} width={300} height={240} rowHeight={48} displayOptions={{ showHeader: false, showTodayHelper: false, }} onSelect={this.handleDateChange}/>

12 123

futbolistua avatar Dec 14 '17 22:12 futbolistua

Any comments, updates?

futbolistua avatar Dec 18 '17 11:12 futbolistua

I have this issue too

hoaiduyit avatar Feb 06 '18 03:02 hoaiduyit

Was running into this issue before, there is another issue where the author suggested hiding and unhiding the calendar with something like this:

<div style={{display: this.state.visible ? 'block': 'none'}}> <InfiniteCalendar />

however when you render the calendar after changing display to block then the child elements aren't rendered.

i got around this by using:

{this.state.visible && <InfiniteCalendar />}

and handling this.visibile in state by having a function that calls this.setState({visible: !this.state.visible}) whenever i want to toggle it

To handle clicking outside the calendar to close i used the package react-onclickoutside then you just export your component as

export default onClickOutside(YourComponent)

hope this helps some people

theonlydaleking avatar Mar 05 '18 01:03 theonlydaleking