fix(launch_bar): calendar month selector not actually working

This commit is contained in:
Elian Doran 2025-12-05 15:50:25 +02:00
parent 66620aabe2
commit 83838bbe76
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

View File

@ -134,9 +134,7 @@ function CalendarMonthSelector({ date, setDate }: CalendarHeaderProps) {
<FormDropdownList <FormDropdownList
values={months} currentValue={date.month().toString()} values={months} currentValue={date.month().toString()}
keyProperty="index" titleProperty="text" keyProperty="index" titleProperty="text"
onChange={value => { onChange={(index) => setDate(date.set("month", parseInt(index, 10)))}
}}
buttonProps={{ "data-calendar-input": "month" }} buttonProps={{ "data-calendar-input": "month" }}
dropdownOptions={{ popperConfig: { placement: "bottom" } }} dropdownOptions={{ popperConfig: { placement: "bottom" } }}
/> />

View File

@ -75,7 +75,11 @@ export default function Dropdown({ id, className, buttonClassName, isStatic, chi
if (externalContainerRef) externalContainerRef.current = containerRef.current; if (externalContainerRef) externalContainerRef.current = containerRef.current;
const $dropdown = $(containerRef.current); const $dropdown = $(containerRef.current);
$dropdown.on("show.bs.dropdown", onShown); $dropdown.on("show.bs.dropdown", (e) => {
// Stop propagation causing multiple shows for nested dropdowns.
e.stopPropagation();
onShown();
});
$dropdown.on("hide.bs.dropdown", (e) => { $dropdown.on("hide.bs.dropdown", (e) => {
// Stop propagation causing multiple hides for nested dropdowns. // Stop propagation causing multiple hides for nested dropdowns.
e.stopPropagation(); e.stopPropagation();