diff --git a/app/component/date/datePicker/NextIconDatePicker.js b/app/component/date/datePicker/NextIconDatePicker.js new file mode 100644 index 0000000..da8d6ad --- /dev/null +++ b/app/component/date/datePicker/NextIconDatePicker.js @@ -0,0 +1,21 @@ +import { Button } from "@mui/material"; +import Image from "next/image"; + +function NextIconDatePicker({ nextIconDatePicker }) { + return ( + + ); +} + +export default NextIconDatePicker; diff --git a/app/component/date/datePicker/PrevIconDatePicker.js b/app/component/date/datePicker/PrevIconDatePicker.js new file mode 100644 index 0000000..5580c75 --- /dev/null +++ b/app/component/date/datePicker/PrevIconDatePicker.js @@ -0,0 +1,21 @@ +import { Button } from "@mui/material"; +import Image from "next/image"; + +function PrevIconDatePicker({ prevIconDatePicker }) { + return ( + + ); +} + +export default PrevIconDatePicker; diff --git a/app/component/date/datePicker/index.js b/app/component/date/datePicker/index.js index c68a169..e7d5dbf 100644 --- a/app/component/date/datePicker/index.js +++ b/app/component/date/datePicker/index.js @@ -4,9 +4,12 @@ import { useEffect, useRef, useState } from "react"; import { DatePicker as DatePickerJalali } from "jalaali-react-date-picker"; import Image from "next/image"; import { Button, Skeleton } from "@mui/material"; +import NextIconDatePicker from "./NextIconDatePicker"; +import PrevIconDatePicker from "./PrevIconDatePicker"; function DatePicker({ date, updateDate }) { const nextIconDatePicker = useRef(); + const prevIconDatePicker = useRef(); const [startDate, setStartDate] = useState(null); const [endDate, setEndDate] = useState(); @@ -42,11 +45,19 @@ function DatePicker({ date, updateDate }) { return (
-
+
+ +
+ } + prevIcon={ + + } onChange={handleStartDateChange} disabledDates={(e) => handleDisableDate(e)} /> @@ -65,18 +76,12 @@ function DatePicker({ date, updateDate }) { timePicker={false} className={`w-full ${loading ? "opacity-0" : "opacity-100"}`} nextIcon={ - + + } + prevIcon={ +
+ +
} onChange={handleEndDateChange} disabledDates={(e) => handleDisableDate(e)} diff --git a/components/booking/date/index.js b/components/booking/date/index.js index 899f697..586759a 100644 --- a/components/booking/date/index.js +++ b/components/booking/date/index.js @@ -4,7 +4,7 @@ import Time from "./Time"; import PlaceVisit from "./PlaceVisit"; function Date({ doctor, setStep }) { - const [locateVisit, setLocateVisit] = useState(); + const [locateVisit, setLocateVisit] = useState(true); const [isError, setIsError] = useState(false); return (