Date field
Collect a date by typing it (DD/MM/YYYY). The calendar button opens a kit sheet: a day / month / year wheel for far dates such as a date of birth, or a month calendar for near dates, both ending in a full-width “Choose date”.











PaymentDateField( label: 'Date of birth', value: DateTime(1995, 8, 17), onChanged: (_) {}, firstDate: DateTime(1900), lastDate: DateUtils.dateOnly(DateTime.now()), );Behavior
Section titled “Behavior”The app-wide date pattern is a hint and persistent caption. Separators are inserted without moving focus. Invalid input shows on blur or Form validation; correcting it clears the kit error. Put age and range rules in your own validator. No per-field pattern override exists.
Picker by purpose. The kit picks the sheet from the allowed span; there is no picker parameter. When lastDate is more than five years after firstDate (DateTime(first.year + 5, first.month, first.day) is before lastDate), the button opens the wheel: day, month and year columns in the typed pattern’s order, opening at the value or, when empty, at lastDate. Days clamp to the month, and dates outside the range are drawn disabled and settle back inside it. Otherwise it opens a full-height month calendar at the value’s month or today’s, with weeks starting on Monday in Indonesian and Sunday in English. Both sheets are built in the kit, so they use kit colours and strings in en and id without GlobalMaterialLocalizations. Pass lastDate: today for past dates such as a date of birth.
Variants
Section titled “Variants”Variants: typed entry with a wheel sheet (span over five years), typed entry with a calendar sheet.
Which variant when
Section titled “Which variant when”| Situation | Variant / composition | Payment example |
|---|---|---|
| KYC birth date | typed entry, wheel (1900 to today) | Use host age/range validation; the app-wide pattern remains visible. |
| Transfer or due date | typed entry, calendar (today to 90 days) | A near span shows weekdays. |
Use Date range picker for a period.
States
Section titled “States”Default, focused, disabled and error. Errors include an icon, text and an edge. Selection controls support hardware keyboards.
Do and don’t
Section titled “Do and don’t”Do: Use host age/range validation; the app-wide pattern remains visible.
Don’t: Use a hint as the only date-format instruction.
Content guidelines
Section titled “Content guidelines”Use short, specific labels and explain how to correct an error.
Accessibility
Section titled “Accessibility”Input text is 16 dp. Legends precede fields in reading order. Labels and errors stay in semantics when visually hidden. The sheets return focus to the field. Each calendar day is a 48 dp button read as its full date (“Tuesday, 20 October 2026, today”); arrow keys move by a day or a week and Enter picks. Each wheel column is adjustable (swipe up or down with a screen reader) and its items grow with the text.
In the example app
Section titled “In the example app”

Customization
Section titled “Customization”The date box follows the field-family PaymentFieldTheme. The calendar and wheel sheets keep their own styling. See Text field customization.
PaymentDateField
class PaymentDateField extends StatefulWidget · lib/src/forms/date_field.dart
Typed calendar date with a kit date sheet. Host owns range rules.
Typing DD/MM/YYYY is the primary path. The calendar button opens a wheel when the allowed span is more than five years (date of birth), otherwise a month calendar; both end in a full-width "Choose date" (D52, D52a).
| Parameter | Type | Default | Description |
|---|---|---|---|
label:required | String | — | label for this field. |
value:required | DateTime? | — | value for this field. |
onChanged:required | ValueChanged<DateTime?> | — | onChanged for this field. |
firstDate:required | DateTime | — | firstDate for this field. |
lastDate:required | DateTime | — | lastDate for this field. |
validator: | FormFieldValidator<DateTime>? | — | validator for this field. |
description: | String? | — | description for this field. |
errorText: | String? | — | errorText for this field. |
required: | bool | false | required for this field. |
hiddenElements: | Set<PaymentFieldPart> | const {} | hiddenElements for this field. |
size: | PaymentSize | PaymentSize.medium | size for this field. |
enabled: | bool | true | enabled for this field. |
focusNode: | FocusNode? | — | focusNode for this field. |
textInputAction: | TextInputAction? | — | textInputAction for this field. |