ValyroUI English version

Date Of Birth Input

Дата рождения тремя списками в порядке локали. Pro · Формы и ввод › Дата и время

Установка

npx valyro-cli@latest login
npx valyro-cli@latest add date-of-birth-input
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { DateOfBirthInput } from 'valyro-ui-pro';

Пропсы

PropTypeDefault
valuestringThe date as YYYY-MM-DD (controlled); an empty string while it is incomplete.
defaultValuestringInitial value when uncontrolled.
onValueChange(value: string) => voidCalled with YYYY-MM-DD once day, month and year are all chosen, and with '' when one is cleared.
minYearnumberEarliest year offered. Default: 120 years ago.
maxYearnumberLatest year offered (e.g. this year minus the minimum age). Default: this year.
order'dmy' | 'mdy' | 'ymd'Field order; by default the locale's own (day–month–year in Russian, month–day–year in US English).
namestringName of a hidden input carrying YYYY-MM-DD, so the date submits with a form.
size'sm' | 'md' | 'lg''md'Height of the selects. Default md.
invalidbooleanfalseMarks the fields as invalid (too young, required and empty).
disabledbooleanfalseDisables the whole control.
localestringBCP 47 locale for the month names and the default order.
labelsPartial<DateOfBirthInputLabels>Overrides for the built-in English text; keys left out keep their defaults.

Похожие компоненты

  • Date Picker — Выбор даты
  • Date Range Picker — Выбор диапазона дат
  • Date Field — Ввод даты по сегментам в порядке локали
  • Time Picker — Выбор времени
  • Time Field — Ввод времени по сегментам, 24 часа или AM/PM
  • Wheel Picker — Барабан выбора в стиле iOS: инерция, 3D-цилиндр, пресеты даты и времени
  • Text Input — Текстовые поля
  • Textarea — Многострочный ввод
  • Search Input — Поисковая строка
  • Mentions Input — Текст с @упоминаниями и #тегами, асинхронные подсказки
  • Tags Input — Ввод тегов
  • Select — Выбор из списка

Назад: Wheel Picker · Далее: Color Picker · Весь раздел «Формы и ввод»