我正在使用 Airbnb 的react-dates库,但在文档中,我没有看到日历(单元格)中每个日期的悬停事件。
我怎样才能实现这个逻辑?我需要它来改变状态。
这是我的代码:
render(){
return(
<>
<DateRangePicker
startDate={this.state.startDate}
startDateId="rentStartDate"
endDate={this.state.endDate}
endDateId="rentEndDate"
onDatesChange={this.onDatesChange}
focusedInput={this.state.focusedInput}
onFocusChange={focusedInput => this.setState({ focusedInput })}
minimumNights={1}
monthFormat="MMMM YYYY"
withFullScreenPortal={this.isMobile()}
small={true}
readOnly={true}
orientation={this.isMobile() ? 'vertical' : 'horizontal'}
openDirection={'up'}
keepOpenOnDateSelect={true}
disableScroll={false}
horizontalMargin={0}
onBlur={this.onDayPickerBlur}
showClearDates={true}
renderCalendarInfo={this.renderInfoCont}
/>
</>
);
}