Correction in Date Ranger in Attendance Logs.
This commit is contained in:
parent
9de0b1a0df
commit
44b3f842f2
@ -63,19 +63,18 @@ const DateRangePicker = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`col-${sm} col-sm-${md} px-1`}>
|
<div className={`position-relative w-auto justify-content-center`}>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
className="form-control form-control-sm ps-2 pe-5 me-4"
|
className="form-control form-control-sm w-100 pe-8 "
|
||||||
placeholder="From to End"
|
placeholder="From to End"
|
||||||
id="flatpickr-range"
|
id="flatpickr-range"
|
||||||
ref={inputRef}
|
ref={inputRef}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<i
|
<i
|
||||||
className="bx bx-calendar calendar-icon cursor-pointer position-relative top-50 translate-middle-y"
|
className="bx bx-calendar calendar-icon cursor-pointer position-absolute top-50 end-0 translate-middle-y me-2 "
|
||||||
onClick={handleIconClick}
|
onClick={handleIconClick}
|
||||||
style={{ right: "22px", bottom: "-8px" }}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@ -130,7 +129,7 @@ export const DateRangePicker1 = ({
|
|||||||
mode: "range",
|
mode: "range",
|
||||||
dateFormat: "d-m-Y",
|
dateFormat: "d-m-Y",
|
||||||
allowInput: allowText,
|
allowInput: allowText,
|
||||||
maxDate ,
|
maxDate,
|
||||||
onChange: (selectedDates) => {
|
onChange: (selectedDates) => {
|
||||||
if (selectedDates.length === 2) {
|
if (selectedDates.length === 2) {
|
||||||
const [start, end] = selectedDates;
|
const [start, end] = selectedDates;
|
||||||
@ -172,7 +171,7 @@ export const DateRangePicker1 = ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [resetSignal, defaultRange, setValue, startField, endField]);
|
}, [resetSignal, defaultRange, setValue, startField, endField]);
|
||||||
|
|
||||||
|
|
||||||
const start = getValues(startField);
|
const start = getValues(startField);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user