Skip to content

Date Picker ​

States

Loading...

<flint-date-picker-calendar> ​

A standalone calendar grid — the core date-selection view. Used internally by flint-date-picker, but can also be used on its own.

  • Tag: <flint-date-picker-calendar>
  • Class: FlintDatePickerCalendar

Import ​

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

Usage ​

html
<flint-date-picker-calendar></flint-date-picker-calendar>

Properties ​

PropertyAttributeTypeDefaultDescription
valuevaluestring | undefined—Currently selected value as ISO string (YYYY-MM-DD).
minminstring | undefined—Minimum selectable date (ISO).
maxmaxstring | undefined—Maximum selectable date (ISO).
disableddisabledbooleanfalseDisable all interaction.

Events ​

EventDetailDescription
flint-date-picker-select&#123; value: string &#125;{ detail: { value: string } } ISO date YYYY-MM-DD

CSS Parts ​

NameDescription
calendarThe calendar element.

CSS Custom Properties ​

PropertyDefault
--flint-font-family—
--flint-surface-1—
--flint-border-radius-xl—
--flint-text-color—
--flint-hover-color—
--flint-text-color-muted—
--flint-primary-color—
--flint-text-color-on-primary—
--flint-primary-color-hover—
--flint-input-bg—
--flint-border-color—
--flint-border-radius-md—
--flint-input-placeholder-color—
--flint-primary-focus-ring—
--flint-input-disabled-bg—
--flint-error-color—
--flint-error-focus-ring—
--flint-datepicker-z-index1400
--flint-shadow-lg—
--flint-shadow-sm—

Methods ​

MethodDescription
navigateTo(iso: string): voidNavigate to the month/year of a given ISO date programmatically.

<flint-date-picker> ​

A date picker with a text field and a calendar popover/modal.

  • Tag: <flint-date-picker>
  • Class: FlintDatePicker

Import ​

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

Usage ​

html
<flint-date-picker></flint-date-picker>

Properties ​

PropertyAttributeTypeDefaultDescription
valuevaluestring''Selected date as ISO string (YYYY-MM-DD).
labellabelstring'Date'Label shown above the field.
placeholderplaceholderstring'MM/DD/YYYY'Placeholder shown in the empty field.
namenamestring''Form field name attribute.
variantvariant'desktop' | 'mobile' | 'static' | 'auto''desktop'Variant: 'desktop' | 'mobile' | 'static' | 'auto'.
minminstring''Minimum selectable date (ISO).
maxmaxstring''Maximum selectable date (ISO).
disableddisabledbooleanfalseDisables the picker.
readonlyreadonlybooleanfalseMakes the field read-only (auto-opens a picker when clicked).
errorerrorbooleanfalseShows error styling.
helperTexthelper-textstring''Helper/error text below the field.
errorMessageerror-messagestring''Error message displayed below the field when in error state.
requiredrequiredbooleanfalseMarks the date picker as required for form validation.
defaultValuedefault-valuestring''Initial value for uncontrolled usage (ISO string).
hoisthoistbooleanfalseWhen true, the calendar popover uses position: fixed instead of position: absolute

Events ​

EventDetailDescription
flint-date-picker-change&#123; value: string &#125;Fired when the date changes. detail: &#123; value: string &#125;