Skip to content
pubscout

date_range_form_field

1.0.2, released 5 years ago by jmaconsulting.biz

A Flutter FormField widget to input a DateRange using showDateRangePicker.

WASM-ready
$ flutter pub add date_range_form_field
Source repository

What it does

Provides a DateRangeField widget that integrates Flutter's showDateRangePicker into standard forms. It accepts an InputDecoration, supports validation, custom date formatting, and handles saving date ranges natively.

AI-written summary of version 1.0.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need users to pick a date range inside a standard Flutter Form
  • You want to validate a selected start and end date before form submission

Skip it when

  • You are building a custom calendar view rather than a form field input
  • You do not need FormField integration and can directly invoke showDateRangePicker

Strengths

  • Seamless integration with Flutter Form state management and validation
  • Supports customizable InputDecoration and date formats

Weaknesses

  • Limited to date range pickers via showDateRangePicker
  • Requires a MaterialWidget ancestor

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1
DateRangeField(
  decoration: InputDecoration(labelText: 'Date Range'),
  validator: (value) => value == null ? 'Please select a date range' : null,
  onSaved: (value) {},
)

Alternatives

Packages that do the same job and could replace date_range_form_field.

Works with

Packages commonly used together with date_range_form_field: ones it builds on, ones built on it, and its own family.