mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-13 06:35:24 +03:00
default to the selected month for selectedDay
This commit is contained in:
parent
5cd4720ef2
commit
6cb90e2ebe
@ -61,6 +61,7 @@ export default function ReviewActivityCalendar({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Calendar
|
<Calendar
|
||||||
|
key={selectedDay ? selectedDay.toISOString() : "reset"}
|
||||||
mode="single"
|
mode="single"
|
||||||
disabled={disabledDates}
|
disabled={disabledDates}
|
||||||
showOutsideDays={false}
|
showOutsideDays={false}
|
||||||
@ -70,6 +71,7 @@ export default function ReviewActivityCalendar({
|
|||||||
components={{
|
components={{
|
||||||
DayContent: ReviewActivityDay,
|
DayContent: ReviewActivityDay,
|
||||||
}}
|
}}
|
||||||
|
defaultMonth={selectedDay ?? new Date()}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -152,12 +154,14 @@ export function TimezoneAwareCalendar({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Calendar
|
<Calendar
|
||||||
|
key={selectedDay ? selectedDay.toISOString() : "reset"}
|
||||||
mode="single"
|
mode="single"
|
||||||
disabled={disabledDates}
|
disabled={disabledDates}
|
||||||
showOutsideDays={false}
|
showOutsideDays={false}
|
||||||
today={today}
|
today={today}
|
||||||
selected={selectedDay}
|
selected={selectedDay}
|
||||||
onSelect={onSelect}
|
onSelect={onSelect}
|
||||||
|
defaultMonth={selectedDay ?? new Date()}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user