UNPKG

@activecollab/components

Version:

ActiveCollab Components

68 lines 2.24 kB
import React, { CSSProperties } from "react"; import { Moment } from "moment"; import { Placement } from "../Popper"; import { ElementWithRef } from "../Select"; export type ChangeMode = "daily" | "weekly" | "monthly" | "quarterly" | "custom"; export interface DateRange { from: Moment; to: Moment | null; } export interface TimestampDateRange { from: number | string | Moment | null; to: number | string | Moment | null; } export interface DatePickerProps { selected?: TimestampDateRange; onChange?: (range?: TimestampDateRange) => void; onSave?: (range?: TimestampDateRange) => void; onClear?: () => void; onClose?: () => void; instant?: boolean; target?: ElementWithRef<Element>; mode: ChangeMode; saveLabel?: string; cancelLabel?: string; clearLabel?: string; disabledDaysBefore?: Moment; disabledDaysAfter?: Moment; disabled?: number[]; modifiers?: { [key: string]: (day: Moment) => { matched: boolean; title: string | null; }; }; disableAnimations?: boolean; firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6; forceClose?: boolean; required?: boolean; month?: Moment | number; disableYearPicker?: boolean; position?: Placement; /** Popper class name*/ popperClassName?: string; backgroundElementClass?: string; /** Menu classes */ menuClassName?: string; enableConfirmModal?: boolean; /** Modal header text */ modalHeaderText?: string; /** Modal cancel button text */ modalCancelBtnText?: string; /** Modal discard button text */ modalDiscardBtnText?: string; /** Modal discard message text */ modalDiscardMessage?: string; /** Popper Tooltip style */ popperTooltipStyle?: CSSProperties; /** Popper Tooltip class name*/ popperTooltipClassName?: string; open?: boolean; onCalendarToggle?: (value: boolean) => void; /** Called when day is clicked */ onDayClick?: (day: Moment, modifiers: string[]) => void; showControls?: boolean; } export declare const toMoment: (date?: string | number | Moment) => any; export declare const DatePicker: React.FC<DatePickerProps>; //# sourceMappingURL=DatePicker.d.ts.map