|
|
|
@ -9,15 +9,15 @@ import persian from "react-date-object/calendars/persian"; |
|
|
|
|
import persian_fa from "react-date-object/locales/persian_fa"; |
|
|
|
|
|
|
|
|
|
//بهتره که این آرایه خارج از کامپوننت اصلی قرار داده بشه.
|
|
|
|
|
const weekDays = [ |
|
|
|
|
"شنبه", |
|
|
|
|
"یکشنبه", |
|
|
|
|
"دوشنبه", |
|
|
|
|
"سشنبه", |
|
|
|
|
"چهارشنبه", |
|
|
|
|
"پنجشنبه", |
|
|
|
|
"جمعه", |
|
|
|
|
]; |
|
|
|
|
// const weekDays = [
|
|
|
|
|
// "شنبه",
|
|
|
|
|
// "یکشنبه",
|
|
|
|
|
// "دوشنبه",
|
|
|
|
|
// "سشنبه",
|
|
|
|
|
// "چهارشنبه",
|
|
|
|
|
// "پنجشنبه",
|
|
|
|
|
// "جمعه",
|
|
|
|
|
// ];
|
|
|
|
|
|
|
|
|
|
function DisablePassedDaies({ direction, handleClick, disabled }) { |
|
|
|
|
return ( |
|
|
|
@ -41,7 +41,7 @@ function CustomRangeInput({ openCalendar, value }) { |
|
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div className="flex flex-row items-center bg-red-600"> |
|
|
|
|
<div className="flex flex-row items-center "> |
|
|
|
|
<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} |
|
|
|
@ -73,12 +73,13 @@ const TestComponentNew = () => { |
|
|
|
|
fixMainPosition={true} |
|
|
|
|
fixRelativePosition={true} |
|
|
|
|
calendarPosition={`${"top"}-${"center"}`} |
|
|
|
|
offsetY={"10"} |
|
|
|
|
onClose={() => false} |
|
|
|
|
arrow={false} |
|
|
|
|
minDate={new Date()} |
|
|
|
|
renderButton={<DisablePassedDaies />} |
|
|
|
|
render={<CustomRangeInput />} |
|
|
|
|
weekDays={weekDays} |
|
|
|
|
// weekDays={weekDays}
|
|
|
|
|
inputClass="custom-input" |
|
|
|
|
className="custom-calendar" |
|
|
|
|
style={{ |
|
|
|
|