@activecollab/components
Version:
ActiveCollab Components
50 lines • 1.94 kB
TypeScript
import { FC } from "react";
import { Placement } from "@popperjs/core";
import { Moment } from "moment";
import { InputMode } from "../../Input/types";
export interface IDateStepperProps {
/** One of the possible steps for this component */
step: "daily" | "weekly" | "monthly" | "quarterly" | "yearly" | "range";
/** Callback function that will be called after the changed range */
onChange?: (from: Date, to: Date) => void;
/** Start date of the range */
from: Moment | string;
/** End date of the range */
to: Moment | string;
/** Callback function that will format the text label */
formatCallback?: (from: string | Moment, to: string | Moment) => string;
/** Default month */
defaultMonth?: Moment;
/** Callback function onBack */
onBack?: (from: Date, to: Date) => void;
/** Callback function onForward */
onForward?: (from: Date, to: Date) => void;
/** Min date */
minValue?: Moment;
/** Max fate */
maxValue?: Moment;
/** html class */
className?: string;
/** Period for calculating week (isoWeek) */
period?: "week" | "isoWeek";
/** Classes for datePicker */
datePickerClass?: string;
/** Show datePicker in the middle button */
withDatePicker?: boolean;
/** Popper class name*/
popperClassName?: string;
/** DatePicker menu position */
position?: Placement;
/** Enable year picker in DatePicker */
enableYearPicker?: boolean;
/** conditional border & button variant styles */
mode?: InputMode;
/** preserve date on smaller screens */
alwaysShowDate?: boolean;
}
/**
* This component allow you to select date range. It accepts two parameters "from" and "to" as valid format
* onChange and onBack and onForward it will return "from: Date" and "to: Date" as function arguments
*/
export declare const DateStepper: FC<IDateStepperProps>;
//# sourceMappingURL=DateStepper.d.ts.map