Skip to content

A Flutter package for all platform which provides a custom date picker

License

Notifications You must be signed in to change notification settings

linagora/flutter-date-range-picker

Repository files navigation

Flutter Date Range Picker

A Flutter package for all platform which provides a custom date picker

image

Screen Shot

Mobile

Simulator Screen Shot - iPhone 14 Pro Max - 2023-03-17 at 19 04 23

Simulator Screen Shot - iPhone 14 Pro Max - 2023-03-17 at 19 04 14

Web

"Screen Shot 2022-03-01 at 15 36 31

Usage

Add the package to pubspec.yaml

dependencies:
  flutter_date_range_picker:
    git:
        url: https://github.com/linagora/flutter-date-range-picker.git
        ref: master

Import it

import 'package:flutter_date_range_picker/flutter_date_range_picker.dart';

Use the widget

  • Open date range picker:
MaterialDateRangePickerDialog.showDateRangePicker(
  context,
  selectDateRangeActionCallback: (startDate, endDate) {}
);
  • Open date picker:
MaterialDateRangePickerDialog.showDatePicker(
  context,
  title
  selectDateActionCallback: (dateSelected) {}
);