Guaxu Docs
    Preparing search index...

    Interface DatePickerProps

    Props for the DatePicker component.

    interface DatePickerProps {
        errorMessage?: string;
        helpMessage?: string;
        isDateUnavailable?: (date: string) => boolean;
        isDisabled?: boolean;
        isInvalid?: boolean;
        isRequired?: boolean;
        label: string;
        name?: string;
        onChange?: (date: string | null) => void;
        setValue: (date: string | null) => void;
        value: string | null;
    }
    Index

    Properties

    errorMessage?: string

    Error message to display when the field is invalid.

    helpMessage?: string

    Optional help or description text shown below the input.

    isDateUnavailable?: (date: string) => boolean

    Function to determine if a date should be disabled/unavailable. Receives an ISO 8601 date string.

    isDisabled?: boolean

    If true, disables the input and calendar popover.

    isInvalid?: boolean

    If true, marks the field as invalid and displays the error message.

    isRequired?: boolean

    If true, marks the field as required.

    label: string

    The label displayed above the date picker input.

    name?: string

    Optional field to link with forms and filters data

    onChange?: (date: string | null) => void

    Optional callback fired when the date changes. Receives an ISO 8601 date string or null.

    setValue: (date: string | null) => void

    Callback to update the selected date value. Receives an ISO 8601 date string or null.

    value: string | null

    The selected date as an ISO 8601 string (e.g., '2024-06-01'), or null for no selection.