diff --git a/ui/src/components/Callendar/index.jsx b/ui/src/components/Callendar/index.jsx index 385de9c..177cab1 100644 --- a/ui/src/components/Callendar/index.jsx +++ b/ui/src/components/Callendar/index.jsx @@ -14,9 +14,12 @@ import { } from "@/components/ui/popover"; const Callendar = ({ className, lastTimeReseted, currentCouterValue }) => { + const fromDate = lastTimeReseted + ? new Date(lastTimeReseted) + : new Date(2024, 4, 13); const [date, setDate] = React.useState({ - from: lastTimeReseted ? new Date(lastTimeReseted) : new Date(2024, 4, 13), - to: addDays(new Date(2024, 4, 13), currentCouterValue), + from: fromDate, + to: addDays(fromDate, currentCouterValue), }); return (