Can I prevent the Calendar from re-rendering when clicking a date in the "second month"? #867
pincscrawfor
started this conversation in
General
Replies: 1 comment
-
I found a solution, but not sure it's the best way. const [displayStartDate, setDisplayStartDate] = useState();
return (
<Calendar
activeStartDate={displayStartDate}
onActiveStartDateChange={({action, activeStartDate}) => {
if (action !== "onChange" && activeStartDate) {
setDisplayStartDate(activeStartDate)
}
}}
/> The only problem here is that if you update the selected range through any external controls, you need to call |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can I prevent the Calendar from re-rendering when clicking a date in the "second month"?
At least to my eye this is confusing, especially when selecting a range. My selection start point jumps as soon as I click it, requiring me to re-orient the range I want to select.
Beta Was this translation helpful? Give feedback.
All reactions