calendar range days

This commit is contained in:
Mikola 2023-10-10 19:21:46 +03:00
parent 58b8119569
commit ff2bd020e8
2 changed files with 11 additions and 4 deletions

View File

@ -42,8 +42,8 @@ export const ProfileCalendar = () => {
setValue(value);
}
function toggleStartRangeDays () {
setStartRangeDays(!startRangeDays)
function toggleStartRangeDays() {
setStartRangeDays(!startRangeDays);
}
useEffect(() => {

View File

@ -31,7 +31,14 @@ import rectangle from "assets/images/rectangle__calendar.png";
// eslint-disable-next-line react/display-name
export const ProfileCalendarComponent = React.memo(
({ value, setValueHandler, reports, totalHours, startRangeDays, toggleRangeDays }) => {
({
value,
setValueHandler,
reports,
totalHours,
startRangeDays,
toggleRangeDays,
}) => {
const dispatch = useDispatch();
const [currentDay] = useState(moment());
@ -268,7 +275,7 @@ export const ProfileCalendarComponent = React.memo(
className="select"
onClick={() => {
if (startRangeDays) resetRangeDays();
toggleRangeDays();
toggleRangeDays();
}}
>
{endDate