Skip to content
Flutter date range pickers use a dialog window to select a range of date on mobile.
Branch: master
Clone or download
Latest commit 68ce4eb Mar 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android/app/src/main/java/io/flutter/plugins format code Oct 1, 2018
lib Update date_range_picker.dart Mar 12, 2019
.gitignore remove ide config Oct 1, 2018
CHANGELOG.md fixed #5 then close #5 Nov 29, 2018
LICENSE Update LICENSE Mar 12, 2019
README.md Update README.md Mar 12, 2019
date_range_picker.iml finish Sep 27, 2018
demo.gif resize gif demo Sep 27, 2018
pubspec.lock finish Sep 27, 2018
pubspec.yaml Update pubspec.yaml Mar 12, 2019

README.md

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")
)
You can’t perform that action at this time.