# `PhiaUi.Components.DateField`
[🔗](https://github.com/charlenopires/PhiaUI/blob/v0.1.17/lib/phia_ui/components/calendar/date_field.ex#L1)

Form-aware standalone date input component for Phoenix LiveView.

`date_field/1` renders a styled `<input type="date">` — label, optional
description, date input, and inline validation errors. It is a lightweight
alternative to `date_picker/1` (which opens a popover calendar); `date_field/1`
uses the native browser date picker with no JavaScript.

## Usage

    <.date_field id="start" name="start_date" label="Start date" />

    <.date_field
      id="due"
      name="due_date"
      label="Due date"
      description="Must be in the future"
      min={Date.to_iso8601(Date.utc_today())}
    />

    <.date_field
      id="birth"
      name="birth_date"
      value="1990-01-15"
      label="Date of birth"
      max="2010-12-31"
      errors={["is required"]}
    />

## Error display

Pass a list of pre-translated error strings via `:errors`. For form-aware
integration, use `phia_input/1` with `type="date"` or `date_picker/1`.

## Global attributes

The following HTML attributes are forwarded to the `<input>` element via
the `:global` attribute: `required`, `placeholder`, `phx-debounce`,
`autocomplete`, `min`, `max`.

# `date_field`

## Attributes

* `id` (`:string`) - Defaults to `nil`.
* `name` (`:string`) - Defaults to `nil`.
* `value` (`:string`) - Defaults to `nil`.
* `label` (`:string`) - Defaults to `nil`.
* `description` (`:string`) - Defaults to `nil`.
* `errors` (`:list`) - Defaults to `[]`.
* `disabled` (`:boolean`) - Defaults to `false`.
* `size` (`:atom`) - Defaults to `:default`. Must be one of `:sm`, `:default`, or `:lg`.
* `class` (`:string`) - Defaults to `nil`.
* Global attributes are accepted. Supports all globals plus: `["required", "placeholder", "phx-debounce", "autocomplete", "min", "max"]`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
