@octopusdeploy/design-system-components
Version:
The design systems component library.
26 lines (25 loc) • 1.25 kB
TypeScript
import type { TextFieldProps } from "../TextField";
export interface DatePickerNewProps extends Omit<TextFieldProps<Date>, "type" | "placeholder" | "onChange" | "prefix" | "suffix" | "validationState"> {
/**
* The callback when the selected date is changed and valid.
* When the date is not valid such as manually typed in the input field, this callback will not be fired
*/
onChange: (date: Date) => void;
/**
* The number of months in the past from today to use as the earliest selectable date
*/
startDateInMonths?: number;
/**
* The number of months in the future from today to use as the last selectable date
*/
endDateInMonths?: number;
/**
* Disable the dates before today in the Calendar
*/
disablePastDates?: boolean;
}
/**
* DatePicker component
* @remarks Only use in pre-approved areas, as in #project-form-uplift if unsure before using.
*/
export declare function DatePicker({ value, onChange, label, description, validationMessage, disabled, hasRequiredMarker, hasOptionalMarker, hasDefaultMarker, popover, autoFocus, readOnly, name, startDateInMonths, endDateInMonths, disablePastDates, }: DatePickerNewProps): import("react/jsx-runtime").JSX.Element;