In my calendar, I made the option to open and close it, but when I close it, and open it again, it is in the month I stopped after closing it, and not in the current month, I want it to open in the current month, I already tried CurrentDate but it keeps opening in the last month I stopped, not the current month.
Asked
Active
Viewed 100 times
1
-
Please provide enough code so others can better understand or reproduce the problem. – Community May 07 '22 at 02:44
1 Answers
0
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}

Steve -Cutter- Blades
- 5,057
- 2
- 26
- 40