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

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

Loading…
Cancel
Save