From 81f84f24f749117ef0954d14f5e4939afcf33cc0 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Wed, 24 Jan 2024 19:13:38 +0530 Subject: [PATCH] fix: outsideClickDetector not working on the date dropdown (#3450) --- web/components/dropdowns/date.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/web/components/dropdowns/date.tsx b/web/components/dropdowns/date.tsx index b346529dc..6e6785284 100644 --- a/web/components/dropdowns/date.tsx +++ b/web/components/dropdowns/date.tsx @@ -1,5 +1,5 @@ import React, { useRef, useState } from "react"; -import { Popover } from "@headlessui/react"; +import { Combobox } from "@headlessui/react"; import DatePicker from "react-datepicker"; import { usePopper } from "react-popper"; import { CalendarDays, X } from "lucide-react"; @@ -153,13 +153,14 @@ export const DateDropdown: React.FC = (props) => { useOutsideClickDetector(dropdownRef, closeDropdown); return ( - - + - + {isOpen && ( - +
= (props) => { inline />
-
+ )} -
+ ); };