update src/components/Datepicker/Calender/index.js and src/components/Datepicker/CalenderList/index.js

master
mahdi 2 years ago
parent 66b7880133
commit 7eb9627d25
  1. 9
      src/components/Datepicker/Calender/index.js
  2. 9
      src/components/Datepicker/CalenderList/index.js

@ -14,17 +14,16 @@ const weekDays = [
"جمعه", "جمعه",
]; ];
const Calender = ({ minimumDate, maximumDate, setDate, date }) => { const Calender = ({ minimumDate, maximumDate }) => {
// const [date, setDate] = useState("1401/03/01"); const [date, setDate] = useState("1401/01/01");
return ( return (
<div className="calender-list"> <div className="calender-list">
<Calendar <Calendar
onChange={setDate} onChange={setDate}
value={date} value={date}
minDate={minimumDate} minDate="1401/01/01"
maxDate={maximumDate} maxDate="1401/01/01"
weekDays={weekDays} weekDays={weekDays}
arrow={false}
calendar={persian} calendar={persian}
locale={persian_fa} locale={persian_fa}
mapDays={({ date }) => { mapDays={({ date }) => {

@ -5,7 +5,7 @@ import Button from "../../ButtonDesign/Button";
import SearchBox from "../../SearchDesign/SearchBox"; import SearchBox from "../../SearchDesign/SearchBox";
const CalenderList = ({ buttons, leftArrow, rightArrow }) => { const CalenderList = ({ buttons, leftArrow, rightArrow }) => {
const [date, setDate] = useState("1401/02/01"); // const [date, setDate] = useState("1401/02/01");
return ( return (
<div className="flex flex-col bg-white mx-auto p-5"> <div className="flex flex-col bg-white mx-auto p-5">
@ -37,12 +37,7 @@ const CalenderList = ({ buttons, leftArrow, rightArrow }) => {
</div> </div>
{/* ? calender list */} {/* ? calender list */}
<div className="flex flex-wrap justify-around mx-auto gap-x-5"> <div className="flex flex-wrap justify-around mx-auto gap-x-5">
<Calender <Calender />
onChange={setDate}
value={date}
minimumDate={"1401/02/01"}
maximumDate={"1401/02/31"}
/>
<Calender /> <Calender />
<Calender /> <Calender />
<Calender /> <Calender />

Loading…
Cancel
Save