Attendence component date customize #123
@ -4,8 +4,10 @@ const DateRangePicker = ({ onRangeChange, DateDifference = 7,defaultStartDate =
|
||||
const inputRef = useRef(null);
|
||||
|
||||
useEffect(() => {
|
||||
const today = defaultStartDate;
|
||||
const today = new Date();;
|
||||
today.setDate(today.getDate() - 1);
|
||||
const fifteenDaysAgo = new Date();
|
||||
|
||||
fifteenDaysAgo.setDate(today.getDate() - DateDifference);
|
||||
|
||||
const fp = flatpickr(inputRef.current, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user