simple-chakra-ui-datepicker
Version:
This is a package inspired on the necesity to use a datepicker for [Chakra UI](https://v1.chakra-ui.com/faq#is-there-a-datepicker-in-chakra-ui).
34 lines (33 loc) • 1.56 kB
TypeScript
import { ReactElement } from 'react';
import { BoxProps, PopoverProps, InputProps } from '@chakra-ui/react';
export interface SimpleDatePickerProps {
isDisabled?: boolean;
icon?: ReactElement;
rightArrowIcon?: ReactElement;
leftArrowIcon?: ReactElement;
containerProps?: Omit<BoxProps, 'position' | 'backgroundColor' | 'opacity'>;
withArrow?: boolean;
isInvalid?: boolean;
popoverProps?: Omit<PopoverProps, 'isOpen' | 'onClose'>;
closable?: boolean;
closeOnClick?: boolean;
placeholder?: string;
inputProps?: Omit<InputProps, 'placeholder' | 'isReadOnly' | 'defaultValue' | 'colorSchema' | 'isInvalid' | 'onClick'>;
defaultValue?: Date;
todayLabel?: string;
clearLabel?: string;
daysLabels?: string[];
months?: string[];
colorSchema?: string;
activeColor?: string;
inactiveColor?: string;
disabledWeekend?: boolean;
maxDate?: Date;
minDate?: Date;
disabledDates?: Date[];
monthGap?: string;
dateBorderRadius?: string;
formatDate?: (arg0: Date) => string;
onChange?: (arg0?: Date) => void;
}
export default function SimpleDatePicker({ isDisabled, icon, rightArrowIcon, leftArrowIcon, withArrow, closable, closeOnClick, isInvalid, containerProps, popoverProps, inputProps, placeholder, clearLabel, todayLabel, daysLabels, defaultValue, months, colorSchema, activeColor, inactiveColor, monthGap, dateBorderRadius, disabledDates, disabledWeekend, maxDate, minDate, onChange, formatDate, }: SimpleDatePickerProps): import("react/jsx-runtime").JSX.Element;