Skip to content

Date Field ​

States

Loading...

A segmented keyboard-driven date input. Each section (month, day, year) is independently editable via keyboard.

  • Tag: <flint-date-field>
  • Class: FlintDateField

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintDateField } from '@getufy/flint-ui';

Usage ​

html
<flint-date-field></flint-date-field>

Properties ​

PropertyAttributeTypeDefaultDescription
valuevaluestring''Controlled date value (ISO YYYY-MM-DD). Set to '' for uncontrolled.
labellabelstring''Field label.
namenamestring''Form field name. Reflected so the browser picks it up for form data collection.
minminstring''Minimum allowed date (ISO).
maxmaxstring''Maximum allowed date (ISO).
disableddisabledbooleanfalseDisables the field and prevents interaction.
readonlyreadonlybooleanfalseMakes the field read-only (visible but not editable).
errorerrorbooleanfalseDisplays the field in an error state.
helperTexthelper-textstring''Helper text shown below the field.
errorMessageerror-messagestring''Error message displayed below the field when in error state.

Events ​

EventDetailDescription
flint-date-field-change&#123; value: string &#125;{ detail: { value: string } } ISO date when all three segments are filled
flint-date-field-clear—Fired when all segments are cleared

CSS Parts ​

NameDescription
baseThe component's base wrapper element.

CSS Custom Properties ​

PropertyDefault
--flint-font-family—
--flint-text-color-muted—
--flint-error-color—
--flint-primary-color—
--flint-input-bg—
--flint-border-color—
--flint-border-radius-md—
--flint-primary-focus-ring—
--flint-error-focus-ring—
--flint-input-disabled-bg—
--flint-text-color—
--flint-input-placeholder-color—
--flint-text-color-on-primary—
--flint-hover-color—

Methods ​

MethodDescription
clear(): voidClears all three segments and fires 'flint-date-field-clear'.