简体   繁体   中英

React Big Calendar Navigate

在我的日历中,我选择了打开和关闭它,但是当我关闭它并再次打开它时,它是在我关闭它后停止的月份,而不是当月,我希望它在本月,我已经尝试过 CurrentDate 但它在我停止的上个月一直打开,而不是当月。

Sounds as if your 'open/close' is hiding the calendar rather then adding it/removing it from the DOM, in which case if will retain state. If you add/remove from DOM on open/close, then the control should rerender, as long as your calendar state is not connected to a higher level context.

{open ? <MyCalendar /> : null}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM