diff --git a/src/components/CustomInputForm/CustomInputForm.tsx b/src/components/CustomInputForm/CustomInputForm.tsx index fc36538..ffcaa7a 100644 --- a/src/components/CustomInputForm/CustomInputForm.tsx +++ b/src/components/CustomInputForm/CustomInputForm.tsx @@ -28,7 +28,7 @@ import { DemoItem } from "@mui/x-date-pickers/internals/demo"; import { DatePicker } from "@mui/x-date-pickers/DatePicker"; import dayjs from "dayjs"; import { useCallback, useEffect, useState } from "react"; -import { Check, Close } from "@mui/icons-material"; +import { Check, Close, RestartAlt } from "@mui/icons-material"; import { NumericFormat, NumericFormatProps } from "react-number-format"; import * as React from "react"; @@ -172,6 +172,12 @@ const CustomInputForm: React.FC = ({ // setToDate(null); }; + const handleReset = () => { + reset(); + setDateObj(null); + setValue({}); + }; + fieldLists.forEach((list) => { list.forEach((obj) => { if ( @@ -490,6 +496,13 @@ const CustomInputForm: React.FC = ({ ))} +