UNPKG

tdesign-react

Version:
68 lines (67 loc) 2.94 kB
import React from 'react'; import type { TdPopupProps } from '../../popup/type'; import type { RangeInputProps } from '../../range-input'; import type { TdDateRangePickerProps } from '../type'; export declare const PARTIAL_MAP: { first: string; second: string; }; export default function useRange(props: TdDateRangePickerProps): { year: number[]; month: number[]; value: import("../type").DateRangeValue; time: string[]; inputValue: any; popupVisible: boolean; rangeInputProps: RangeInputProps; popupProps: { trigger: TdPopupProps["trigger"]; overlayInnerStyle: React.CSSProperties | ((triggerElement: HTMLElement, popupElement: HTMLElement) => import("../../common").Styles); overlayClassName: string; onVisibleChange: (visible: boolean, ctx: import("../../popup/type").PopupVisibleChangeContext) => void; expandAnimation: boolean; updateScrollTop?: (content: HTMLDivElement) => void; attach?: import("../../common").AttachNode; children?: import("../../common").TNode; content?: import("../../common").TNode; delay?: number | Array<number>; destroyOnClose?: boolean; disabled?: boolean; hideEmptyPopup?: boolean; overlayInnerClassName?: import("../../common").ClassName; overlayStyle?: import("../../common").Styles | ((triggerElement: HTMLElement, popupElement: HTMLElement) => import("../../common").Styles); placement?: import("../../popup/type").PopupPlacement; popperOptions?: object; showArrow?: boolean; triggerElement?: import("../../common").TNode; visible?: boolean; defaultVisible?: boolean; zIndex?: number; onOverlayClick?: (context: { e: React.MouseEvent<HTMLDivElement>; }) => void; onScroll?: (context: { e: React.WheelEvent<HTMLDivElement>; }) => void; onScrollToBottom?: (context: { e: React.WheelEvent<HTMLDivElement>; }) => void; }; isHoverCell: boolean; onChange: import("../../hooks/useControlled").ChangeHandler<import("../type").DateRangeValue, [context: { dayjsValue?: import("dayjs").Dayjs[]; trigger?: import("../type").DatePickerTriggerSource; }]>; setYear: React.Dispatch<React.SetStateAction<number[]>>; setMonth: React.Dispatch<React.SetStateAction<number[]>>; setTime: React.Dispatch<React.SetStateAction<string[]>>; setIsHoverCell: React.Dispatch<React.SetStateAction<boolean>>; setInputValue: React.Dispatch<any>; setPopupVisible: React.Dispatch<React.SetStateAction<boolean>>; activeIndex: number; setActiveIndex: React.Dispatch<React.SetStateAction<number>>; isFirstValueSelected: boolean; setIsFirstValueSelected: React.Dispatch<React.SetStateAction<boolean>>; cacheValue: any; setCacheValue: React.Dispatch<any>; };