Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

flutter flutter logo date range picker

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

demo

flutter date range picker dialog

getting started

installation

add to pubspec.yaml in dependencies

  date_range_picker: ^1.0.3

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")
)

download the full project for this post from the following button

this source is fully free for all time

download as zip


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.