|
|
|
@ -36,24 +36,29 @@ function DisablePassedDaies({ direction, handleClick, disabled }) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function CustomRangeInput({ openCalendar, value }) { |
|
|
|
|
// let from = value[0] || "";
|
|
|
|
|
// let to = value[1] || "";
|
|
|
|
|
|
|
|
|
|
// value = from && to ? "از " + from + "، تا " + to": from
|
|
|
|
|
useEffect(() => { |
|
|
|
|
openCalendar(); |
|
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div> |
|
|
|
|
<input onFocus={openCalendar} value={value[0]} readOnly /> |
|
|
|
|
<input onFocus={openCalendar} value={value[1]} readOnly /> |
|
|
|
|
<div className="flex flex-row items-center bg-red-600"> |
|
|
|
|
<input |
|
|
|
|
className="w-full py-1 text-center text-sm rounded-md border border-gray-200 focus:outline-none focus:border-sky-200 focus:ring-sky-200 focus:ring-1" |
|
|
|
|
onFocus={openCalendar} |
|
|
|
|
value={value[0]} |
|
|
|
|
readOnly |
|
|
|
|
/> |
|
|
|
|
<p className="mx-2 text-sm">تا</p> |
|
|
|
|
<input |
|
|
|
|
className="w-full py-1 text-center text-sm rounded-md border border-gray-200 focus:outline-none focus:border-sky-200 focus:ring-sky-200 focus:ring-1" |
|
|
|
|
onFocus={openCalendar} |
|
|
|
|
value={value[1]} |
|
|
|
|
readOnly |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
const TestComponentNew = () => { |
|
|
|
|
const [shouldOpenCalendar, setShouldOpenCalendar] = useState(false); |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div |
|
|
|
|
className="bg-pink-100 w-1/2 mx-auto mt-20" |
|
|
|
@ -80,6 +85,7 @@ const TestComponentNew = () => { |
|
|
|
|
width: "100%", |
|
|
|
|
height: "33px", |
|
|
|
|
boxSizing: "border-box", |
|
|
|
|
backgroundColor: "red", |
|
|
|
|
}} |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|