Issues_Aug_2W #371

Merged
pramod.mahajan merged 29 commits from Issues_Aug_2W into main 2025-09-05 05:45:32 +00:00
2 changed files with 9 additions and 3 deletions
Showing only changes of commit fa878642b6 - Show all commits

View File

@ -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}

View File

@ -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);