@activecollab/components
Version:
ActiveCollab Components
45 lines • 1.75 kB
TypeScript
import { FC } from "react";
import { Placement } from "@popperjs/core";
import { Moment } from "moment";
export interface IDateStepperPropsV2 {
/** 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;
}
/**
* 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 DateStepperV2: FC<IDateStepperPropsV2>;
//# sourceMappingURL=DateStepperV2.d.ts.map