UNPKG

@chynna/react-calendar

Version:

A flexible and feature-rich calendar component library for React applications with drag-and-drop support, multiple views (Day, Week, Month, Year), and plugin architecture

25 lines (24 loc) 918 B
import React from 'react'; import { Temporal } from 'temporal-polyfill'; type ZonedRange = [Temporal.ZonedDateTime, Temporal.ZonedDateTime]; export interface RangePickerProps { value: [ Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime, Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime ]; format?: string; showTimeFormat?: string; showTime?: boolean | { format?: string; }; onChange?: (value: ZonedRange, dateString: [string, string]) => void; onOk?: (value: ZonedRange, dateString: [string, string]) => void; timeZone?: string; disabled?: boolean; placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight'; autoAdjustOverflow?: boolean; getPopupContainer?: () => HTMLElement; matchTriggerWidth?: boolean; } declare const RangePicker: React.FC<RangePickerProps>; export default RangePicker;