Skip to Content
Components
DateInput ALPHA

DateInput

Input field with calendar that lets user enter dates.

Documentation

Usage

import type { ComponentPropsWithoutRef } from "react"; import { Field } from "@optiaxiom/react"; import { DateInput } from "@optiaxiom/react/unstable"; export function App({ description, error, label = "Input label", required = false, }: Pick< ComponentPropsWithoutRef<typeof Field>, "description" | "error" | "label" | "required" >) { return ( <Field description={description} error={error} label={label} required={required} w="224" > <DateInput /> </Field> ); }

Props

Calendar

Supports all Box props in addition to its own. Renders a <div> element.

Prop

addonAfter

Display content inside the input at the end.

ReactNode

addonBefore

Display content inside the input at the start.

ReactNode

addonPointerEvents

When this prop is set to none clicking empty space inside the addon will focus the input box.

"none" | "auto"

appearance

Control the appearance of the input.

"number" | "default"

asChild

Change the default rendered element for the one passed as a child, merging their props and behavior.

Read the Composition guide for more details.

false | true

className

string

disabled

Whether the input is disabled.

false | true

error

Whether to show the input error state.

false | true

htmlSize

Control the native input size attribute.

number

size

Control the size of the input.

"md" | "lg" | "xl"

Changelog

0.12.1

  • Added component
Last updated on