import React, { FC, useRef } from 'react' import _ from 'lodash' import classNames from 'classnames' import { Popover } from '../popover' import { Selection } from '../selection' import TimeSpan from './time_span' import { TimeSpanPickerProps } from './types' import { renderItemFunc } from './util' const TimeSpanPicker: FC = ({ min, max, disabledSpan, span, date, children, disabled, renderItem = renderItemFunc, onChange, className, isInPopup, enabledEndTimeOfDay, beginTime, endTime, ...rest }) => { const popoverRef = useRef(null) const handleSelectTime = (date: Date): void => { popoverRef.current!.apiDoSetActive() onChange(date) } // disabledClose,此函数不会运行 const handleSelect = (): void => {} const popup = ( ) const selected = date ? { value: date, text: renderItem!(date) } : null return ( {children ?? ( )} ) } export default TimeSpanPicker