Issues_Aug_2W #371
@ -126,7 +126,7 @@ const EmpAttendance = ({ employee }) => {
|
|||||||
className="dataTables_length text-start py-2 d-flex justify-content-between "
|
className="dataTables_length text-start py-2 d-flex justify-content-between "
|
||||||
id="DataTables_Table_0_length"
|
id="DataTables_Table_0_length"
|
||||||
>
|
>
|
||||||
<div className="col-md-3 my-0 ">
|
<div className="col-md-4 my-0 ">
|
||||||
<DateRangePicker
|
<DateRangePicker
|
||||||
DateDifference="30"
|
DateDifference="30"
|
||||||
onRangeChange={setDateRange}
|
onRangeChange={setDateRange}
|
||||||
|
@ -46,6 +46,12 @@ const DateRangePicker = ({
|
|||||||
};
|
};
|
||||||
}, [onRangeChange, DateDifference, endDateMode]);
|
}, [onRangeChange, DateDifference, endDateMode]);
|
||||||
|
|
||||||
|
const handleIconClick = () => {
|
||||||
|
if (inputRef.current) {
|
||||||
|
inputRef.current._flatpickr.open(); // directly opens flatpickr
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`col-${sm} col-sm-${md} px-1`}>
|
<div className={`col-${sm} col-sm-${md} px-1`}>
|
||||||
<input
|
<input
|
||||||
@ -57,7 +63,7 @@ const DateRangePicker = ({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<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-relative top-50 translate-middle-y " onClick={handleIconClick}
|
||||||
style={{ right: "22px", bottom: "-8px" }}
|
style={{ right: "22px", bottom: "-8px" }}
|
||||||
></i>
|
></i>
|
||||||
</div>
|
</div>
|
||||||
@ -77,7 +83,7 @@ export const DateRangePicker1 = ({
|
|||||||
className = "",
|
className = "",
|
||||||
allowText = false,
|
allowText = false,
|
||||||
resetSignal,
|
resetSignal,
|
||||||
defaultRange = true,
|
defaultRange = true,
|
||||||
...rest
|
...rest
|
||||||
}) => {
|
}) => {
|
||||||
const inputRef = useRef(null);
|
const inputRef = useRef(null);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user