-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
Because we're using maxValue
as a prop to useDateTimeRangePicker
which is set to now(getLocalTimeZone())
(to prevent a user from setting and end time beyond the current moment). It's continuously causing re-renders in any component that calls it.
It'd obviously defeat the point if we memoized the current time. I thought we could call now()
within the DateRangePicker
itself at change time but it seems like the props are just forwarded to useDateRangePickerState
. We can investigate further, maybe there's react-aria
feature that'll handle this for us.
Don't think this is actually the reason, since now()
will just get called when the component re-renders. Something else is afoot.
Metadata
Metadata
Assignees
Labels
No labels