Skip to content

Flutter date range pickers use a dialog window to select a range of date on mobile.

License

Notifications You must be signed in to change notification settings

Dinver/date_range_picker

 
 

Repository files navigation

Awesome Flutter pub version

Date Range Picker

Flutter date range pickers use a dialog window to select a range of date on mobile.

Demo

Getting Started

Installation

Add to pubspec.yaml in dependencies

  date_range_picker: ^1.0.5

Usage

import 'package:date_range_picker/date_range_picker.dart' as DateRagePicker;
...
new MaterialButton(
    color: Colors.deepOrangeAccent,
    onPressed: () async {
      final List<DateTime> picked = await DateRagePicker.showDatePicker(
          context: context,
          initialFirstDate: new DateTime.now(),
          initialLastDate: (new DateTime.now()).add(new Duration(days: 7)),
          firstDate: new DateTime(2015),
          lastDate: new DateTime(2020)
      );
      if (picked != null && picked.length == 2) {
          print(picked);
      }
    },
    child: new Text("Pick date range")
)

About

Flutter date range pickers use a dialog window to select a range of date on mobile.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 98.8%
  • Java 1.2%