liber-salti
Version:
Saltí - Liber Design System
48 lines (47 loc) • 1.18 kB
TypeScript
import { Moment } from 'moment';
export interface DatePickerProps {
/**
* The size of the `input` element.
*/
size?: 'medium' | 'large';
/**
* The value of the `input` element.
*/
value?: Moment | null;
/**
* Callback fired when the value is changed.
*/
onChange: (e?: Moment) => void;
/**
* Callback fired when the date is invalid.
*/
onError?: (e: unknown) => void;
/**
* If `true`, the `input` element will be disabled.
*/
disabled?: boolean;
/**
* If `true`, the label will be displayed in an error state.
*/
error?: boolean;
/**
* If `true`, the input will take up the full width of its container.
*/
fullWidth?: boolean;
/**
* The helper text content.
*/
helperText?: string;
/**
* The label of the input.
*/
label?: string;
/**
* If `true`, the label is displayed as required and the `input` element` will be required.
*/
required?: boolean;
/**
* Disable dates function
*/
shouldDisableDate?: (day: unknown) => boolean;
}