@octopusdeploy/design-system-components
Version:
The design systems component library.
56 lines (55 loc) • 1.72 kB
TypeScript
export interface DatePickerProps {
/**
* A boolean property which controls whether the date picker is disabled.
*/
disabled?: boolean;
/**
* The label to use for the date picker.
*/
label?: string;
/**
* An optional error string to display below the date picker.
*/
error?: string;
/**
* An optional name to use for the date picker.
*/
name?: string;
/**
* The minimum date available as a selection in the date picker. Any dates before this
* will not be selectable.
*/
minDate?: Date;
/**
* The date format to use when displaying the date.
* @default "MMM dd, yyyy"
* @remarks please see https://date-fns.org/v2.30.0/docs/format for available formatting options.
*/
format?: string;
/**
* The current date value to use for the picker.
*/
value: Date | null;
/**
* The change callback handler
* @description
* The onChange callback is fired whenever the date is changed and is guaranteed to be a valid
* date.
*/
onChange: (newValue: Date) => void;
/**
* A note to show below the date picker
*/
note?: string;
/**
* Whether the date input should take up the full width of its container
*/
fullWidth?: boolean;
}
/**
* @deprecated
* Deprecated: 05/02/2026
* Replacement: DatePicker component from @octopusdeploy/design-system-components
* Reason: This component is deprecated and will be removed in a future release.
*/
export declare function DeprecatedDatePicker({ value, label, error, name, disabled, format, minDate, onChange, note, fullWidth }: DatePickerProps): import("react/jsx-runtime").JSX.Element;