i want to render the calendar with a new defaultDate, i use the defaultDate with a useState and update with a onClick function with a new date, but the filter don't render the new date, this is the code:
const [defaultDate, setDefaultDate] = useState(new Date());
function filterDate(date, hour){
setDefaultDate(new Date(date+'T'+hour))
}
<Calendar
defaultDate={defaultDate}
events={myEvents}
localizer={localizer}
startAccessor="start"
endAccessor="end"
today
style={{ height: '80vh' }}
onSelectEvent={handleSelectEvent}
selectable
/>
already tried to use an useEffect but had the same problem.