import React, { ReactNode, useEffect, useRef, useState, forwardRef, } from "react"; import classNames from "classnames"; import ReactDatePicker, { ReactDatePickerProps } from "react-datepicker"; import { addMonths, format, isEqual, isValid, startOfMonth } from "date-fns"; import { Input, INPUT_ICON_POSITION } from "../Input"; import { bemHOF } from "../../utilities/bem"; import { PopoverMenu } from "../PopoverMenu"; import { Text } from "../Text"; import { Box, BoxProps } from "../Box"; import { Heading } from "../Heading"; import { Flex } from "../Flex"; import { Button, BUTTON_VARIANT } from "../Button"; import { ICON_TYPE } from "../Icon"; const cn = bemHOF("DatePicker"); const MONTH_YEAR_FORMAT = "MMMM yyyy"; export const DatePickerInput = forwardRef((props, ref) => ( )); const renderDayContents = (day: number) => { return ( {day} ); }; interface CustomHeaderProps { date: Date; decreaseMonth: () => void; increaseMonth: () => void; prevMonthButtonDisabled: boolean; nextMonthButtonDisabled: boolean; } type HeaderPropsState = CustomHeaderProps | null; const CustomHeaderButtons = ({ decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, }: Omit) => (