UNPKG

@octopusdeploy/design-system-components

Version:
28 lines (27 loc) 1.31 kB
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 Rollout currently paused — do not use in new code until further notice. * Use `<DeprecatedDatePicker>` instead. * @see <DeprecatedDatePicker> */ 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;