diff --git a/src/components/molecules/Calendar/index.tsx b/src/components/molecules/Calendar/index.tsx index a03b4849..e06ae999 100644 --- a/src/components/molecules/Calendar/index.tsx +++ b/src/components/molecules/Calendar/index.tsx @@ -36,6 +36,7 @@ const Calendar = ({ }: ICalendarProps) => { const [showCalendar, setShowCalendar] = useState(false); const dateContainerRef = useRef(null); + const minDate = new Date(2021, 7, 1); const setTimePeriod = ( from: number, @@ -44,7 +45,7 @@ const Calendar = ({ resetHours: boolean = true, btnSelected: TSelectedPeriod = "custom", ) => { - const start = from === Infinity ? new Date(2021, 7, 1) : new Date(); + const start = from === Infinity ? minDate : new Date(); const end = new Date(); setLastBtnSelected(btnSelected); @@ -148,6 +149,7 @@ const Calendar = ({ selectsRange inline maxDate={new Date()} + minDate={minDate} monthsShown={isDesktop ? 2 : 1} showMonthDropdown /> @@ -176,6 +178,7 @@ const Calendar = ({
{showAgoButtons ? (
+ {/* don't show at the moment + */}