UNPKG

tdesign-react

Version:
60 lines (59 loc) 2.61 kB
import dayjs from 'dayjs'; import React from 'react'; import type { TdPopupProps } from '../../popup/type'; import type { TdDatePickerProps } from '../type'; export default function useSingleInput(props: TdDatePickerProps): { year: number; month: number; value: import("../type").DateValue | import("../type").DateMultipleValue; time: any; inputValue: any; popupVisible: boolean; inputProps: import("../..").InputProps & { ref?: React.MutableRefObject<HTMLInputElement>; }; popupProps: { trigger: TdPopupProps["trigger"]; overlayInnerStyle: React.CSSProperties | ((triggerElement: HTMLElement, popupElement: HTMLElement) => import("../../common").Styles); overlayClassName: string; onVisibleChange: (visible: boolean, context: any) => 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; onScroll?: (context: { e: React.WheelEvent<HTMLDivElement>; }) => void; onScrollToBottom?: (context: { e: React.WheelEvent<HTMLDivElement>; }) => void; }; tagInputProps: {}; inputRef: React.MutableRefObject<HTMLInputElement>; cacheValue: any; onChange: import("../../hooks/useControlled").ChangeHandler<import("../type").DateValue | import("../type").DateMultipleValue, [context: { dayjsValue?: dayjs.Dayjs; trigger?: import("../type").DatePickerTriggerSource; }]>; setYear: React.Dispatch<React.SetStateAction<number>>; setMonth: React.Dispatch<React.SetStateAction<number>>; setTime: React.Dispatch<any>; setIsHoverCell: React.Dispatch<React.SetStateAction<boolean>>; setInputValue: React.Dispatch<any>; setPopupVisible: React.Dispatch<React.SetStateAction<boolean>>; setCacheValue: React.Dispatch<any>; };