fix: filter custom date select toggle (#4244)

This commit is contained in:
Anmol Singh Bhatia 2024-04-23 12:56:21 +05:30 committed by GitHub
parent 5d8c5b22e8
commit beff8536c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 79 additions and 10 deletions

View file

@ -6,7 +6,7 @@ import { FilterHeader, FilterOption } from "@/components/issues";
// constants
import { DATE_BEFORE_FILTER_OPTIONS } from "@/constants/filters";
// helpers
import { isDate } from "@/helpers/date-time.helper";
import { isInDateFormat } from "@/helpers/date-time.helper";
type Props = {
appliedFilters: string[] | null;
@ -27,7 +27,7 @@ export const FilterCreatedDate: React.FC<Props> = observer((props) => {
);
const isCustomDateSelected = () => {
const isValidDateSelected = appliedFilters?.filter((f) => isDate(f.split(";")[0])) || [];
const isValidDateSelected = appliedFilters?.filter((f) => isInDateFormat(f.split(";")[0])) || [];
return isValidDateSelected.length > 0 ? true : false;
};
const handleCustomDate = () => {