The calendar icon should display correctly when we increase the zoom. #363
@ -126,7 +126,7 @@ const EmpAttendance = ({ employee }) => {
|
||||
className="dataTables_length text-start py-2 d-flex justify-content-between "
|
||||
id="DataTables_Table_0_length"
|
||||
>
|
||||
<div className="col-md-3 my-0 ">
|
||||
<div className="col-md-4 my-0 ">
|
||||
<DateRangePicker
|
||||
DateDifference="30"
|
||||
onRangeChange={setDateRange}
|
||||
|
@ -46,6 +46,12 @@ const DateRangePicker = ({
|
||||
};
|
||||
}, [onRangeChange, DateDifference, endDateMode]);
|
||||
|
||||
const handleIconClick = () => {
|
||||
if (inputRef.current) {
|
||||
inputRef.current._flatpickr.open(); // directly opens flatpickr
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={`col-${sm} col-sm-${md} px-1`}>
|
||||
<input
|
||||
@ -57,7 +63,7 @@ const DateRangePicker = ({
|
||||
/>
|
||||
|
||||
<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" }}
|
||||
></i>
|
||||
</div>
|
||||
@ -77,7 +83,7 @@ export const DateRangePicker1 = ({
|
||||
className = "",
|
||||
allowText = false,
|
||||
resetSignal,
|
||||
defaultRange = true,
|
||||
defaultRange = true,
|
||||
...rest
|
||||
}) => {
|
||||
const inputRef = useRef(null);
|
||||
|
Loading…
x
Reference in New Issue
Block a user