update src/components/TestComponentNew/index.js and src/components/TestComponentNew/index.scss

master
mahdi andalib 2 years ago
parent 386b64a1fa
commit 3eaa7db645
  1. 23
      src/components/TestComponentNew/index.js
  2. 18
      src/components/TestComponentNew/index.scss

@ -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={{

@ -1,12 +1,12 @@
.custom-input {
// border-radius: 15px;
// border: 1px #0c8af8 solid;
// padding: 4px 12px;
// background-color: white;
// height: 22px;
// box-shadow: 0 0 2px #0074d9;
// display: none !important;
}
// .custom-input {
// border-radius: 15px;
// border: 1px #0c8af8 solid;
// padding: 4px 12px;
// background-color: white;
// height: 22px;
// box-shadow: 0 0 2px #0074d9;
// display: none !important;
// }
// .custom-input:focus {
// outline: none;

Loading…
Cancel
Save