我有日期选择器组件(DayPickerSingleDateController)。有 ”
超出范围
属性(仅可用 +4(从到今天)天。)
但正因为如此,会发生错误。如果当前月份没有可用日期,则事件仍然显示当前月份 onClick。
现在我尝试添加 initialMonth 属性,我想在其中检查本月是否没有可用的日期,然后 () => moment().add(1, 'month')。
initialVisibleMonth={.... () => moment().add(1, 'month')}
isOutsideRange={(day) => isInclusivelyBeforeDay(day, moment().add(4, 'days'))}
我怎样才能做到这一点?