Skip to content
On this page

DateField

An editable date control with localized date formatting.

DateField in FluttyUIDateField in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

DateField

const DateField({
  super.key,
  this.size,
  this.value,
  this.initialDate,
  required this.onChanged,
  this.placeholder,
  this.enabled = true,
  this.showPickerOnTap = true,
  this.minimumDate,
  this.maximumDate,
  this.firstDayOfWeek,
  this.backgroundColor,
  this.foregroundColor,
  this.placeholderColor,
  this.borderColor,
  this.focusColor,
  this.borderRadius,
  this.padding,
  this.height,
  this.pickerPadding,
});
ParameterTypeRequiredDefault
keyKey?Nonull
sizeComponentSize?Nonull
valueDateTime?Nonull
initialDateDateTime?Nonull
onChangedValueChanged<DateTime>Yes—
placeholderString?Nonull
enabledboolNotrue
showPickerOnTapboolNotrue
minimumDateDateTime?Nonull
maximumDateDateTime?Nonull
firstDayOfWeekint?Nonull
backgroundColorColor?Nonull
foregroundColorColor?Nonull
placeholderColorColor?Nonull
borderColorColor?Nonull
focusColorColor?Nonull
borderRadiusdouble?Nonull
paddingEdgeInsetsGeometry?Nonull
heightdouble?Nonull
pickerPaddingEdgeInsetsGeometry?Nonull

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/date_time/date_field/date_field.dart

This reference is generated from the DateField declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI