---
title: "Introducing Date Range Picker Widget in Flutter"
published_at: "2020-04-06T11:00:17+00:00"
modified_at: "2026-02-10T11:22:53+00:00"
url: "https://www.syncfusion.com/blogs/post/introducing-date-range-picker-widget-in-flutter"
excerpt: "We are pleased to introduce our new widget, the Date Range Picker, for the Flutter platform with our 2020 Volume 1 release. You can find the beta version of the Syncfusion Flutter date picker package in pub.dev. The Syncfusion Flutter..."
taxonomy_category:
  - "Flutter"
taxonomy_post_tag:
  - "Android App"
  - "DateRangePicker"
  - "Flutter"
  - "iOS app"
---

# Introducing Date Range Picker Widget in Flutter

[Nijamudeen](https://www.syncfusion.com/blogs/author/nijamudeensulaiman)

![Introduction Datepicker widget in flutter](https://www.syncfusion.com/blogs/wp-content/uploads/2020/04/Introduction-Datepicker-widget-in-flutter.jpg)


We are pleased to introduce our new widget, the **[Date Range Picker](https://www.syncfusion.com/flutter-widgets/flutter-daterangepicker)**, for the Flutter platform with our [2020 Volume 1](https://www.syncfusion.com/forums/152921/essential-studio-2020-volume-1-release-v18-1-0-42-is-available-for-download)
 release. You can find the beta version of the Syncfusion Flutter [date picker](https://pub.dev/packages/syncfusion_flutter_datepicker)
 package in [pub.dev](https://pub.dev/packages/syncfusion_flutter_calendar)
.

The Syncfusion Flutter Date Range Picker is a lightweight widget that allows the users to easily select a single date, multiple dates, or a range of dates. It provides month, year, decade, and century view options to navigate quickly to the desired date. It supports minimum, maximum, and disabled dates to restrict the date selection.

Let’s now briefly see the features of the Date Range Picker, and then I’ll walk you through the steps to add one to your application. The following are the features of the Syncfusion Flutter Date Range Picker:

- [Multiple calendar view modes](#multiple-calendar-view-modes)
- [Quick navigation](#quick-navigation)
- [Date selection](#date-selection)
- [Date selection range limits](#limit-the-date-selection)
- [First day of the week customization](#first-day-of-week)
- [Blackout dates](#blackout-dates)
- [Holiday and weekend highlighting](#highlight-holidays-and-weekends)
- [Appearance customization](#apperance-customization)
- [Right to left (RTL) rendering](#right-to-left)
- [Accessibility](#accessibility)
- [Globalization](#globalization)

## Multiple calendar view modes

Display month, year, decade, and century views. Users can easily select and navigate among these built-in views. The widget supports programmatic navigation, too.![Multiple calendar view modes](https://www.syncfusion.com/blogs/wp-content/uploads/2020/04/01-Multiple-calendar-view-modes.png)

## Quick navigation

You can navigate back and forth among the date picker views and the different view modes.

## Date selection

You can select single, multiple, and a range of dates. The widget also supports programmatic selection.![Date selection](https://www.syncfusion.com/blogs/wp-content/uploads/2020/04/02-Date-selection.png)

## Limit the date selection range

This feature limits the date selection range to between a specific minimum and maximum date.![Limit the date selection range](https://www.syncfusion.com/blogs/wp-content/uploads/2020/04/03-Limit-the-date-selection-range.png)

## First day of week

You can customize the first day of the week as needed. By default, the first day is Sunday.

## Blackout dates

You can disable any date in a calendar to make it inactive. You can also easily prevent the selection of weekends by disabling them.![Blackout dates](https://www.syncfusion.com/blogs/wp-content/uploads/2020/04/04-Blackout-dates.png)

## Highlight holidays and weekends

By using decoration in the Flutter Date Range Picker, you can highlight any date or every weekend in a month as special days.![Highlight holidays and weekends](https://www.syncfusion.com/blogs/wp-content/uploads/2020/04/05-Highlight-holidays-and-weekends.png)

## Appearance customization

You can change the look and feel of the Date Range Picker by customizing its default appearance and style using a theme and Flutter decorations.

## Right to left (RTL) rendering

There is right-to-left direction support for users who are working in RTL languages like Hebrew and Arabic.![Right to left (RTL) rendering](https://www.syncfusion.com/blogs/wp-content/uploads/2020/04/06-Right-to-left-RTL-rendering.png)

## Accessibility

Screen readers have easy access to the Date Range Picker.

## Globalization

Display the current date and time with global date and time formats.![Globalization](https://www.syncfusion.com/blogs/wp-content/uploads/2020/04/07-Globalization.png)

## Add Flutter Date Range Picker to your app

This section explains the creation of a simple date range picker Flutter application to demonstrate the basic usage.

### Add dependency

Add the Syncfusion Flutter datepicker dependency in your pub sec file.

```
syncfusion_flutter_datepicker: ^18.1.0.42-beta
```

### Get packages

Run the following commands to get the required packages.

```
$ flutter pub get
```

### Import package

Import the following package in your Dart code.

```
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
```

## Add a Date Range Picker to the widget tree

After importing the package, initialize SfDateRangePicker as a child of any widget, such as a container widget.

```
@override
Widget build(BuildContext context) {
  return Scaffold(
      body: Container(
    child: SfDateRangePicker(),
  ));
}
```

### Change calendar views

The Date Range Picker widget provides four different types of views to display. One can be assigned to the widget constructor using the view property. By default, the view of the widget is month view, and the current date will be displayed initially for all the Date Range Picker views.

```
@override
Widget build(BuildContext context) {
return Scaffold(
      body: SfDateRangePicker(
      view: DateRangePickerView.year,
  ));
}
```

### Change the first day of the week

The Date Range Picker widget will be rendered with Sunday as the first day of the week. You can customize it to any day using the `firstDayOfWeek` property. The following code example illustrates this.

```
@override
Widget build(BuildContext context) {
  return Scaffold(
      body: SfDateRangePicker(
    view: DateRangePickerView.month,
    monthViewSettings: DateRangePickerMonthViewSettings(firstDayOfWeek: 1),
  ));
}
```

### Date selection

The selected date or range details can be obtained using the `onSelectionChanged` callback. The callback will return the `DateRangePickerSelectionChangedArgs`, which contains the selected date or range details.

```
void _onSelectionChanged(DateRangePickerSelectionChangedArgs args) {
  // TODO: implement your code here
}

@override
Widget build(BuildContext context) {
  return MaterialApp(
    home: Scaffold(
      body: Container(
        child: SfDateRangePicker(
          onSelectionChanged: _onSelectionChanged,
          selectionMode: DateRangePickerSelectionMode.range,
        ),
      ),
    ),
  );
}
```

### Adding blackout dates

Disable any date in a calendar to make it inactive. Easily prevent the selection of any dates by disabling them. The following code example illustrates this.

```
@override
Widget build(BuildContext context) {
  return MaterialApp(
    home: Scaffold(
      body: SfDateRangePicker(
        controller: _pickerController,
        view: DateRangePickerView.month,
        monthViewSettings: DateRangePickerMonthViewSettings(
            blackoutDates: [
              DateTime.now().add((Duration(days: 2))),
              DateTime.now().add((Duration(days: 7))),
              DateTime.now().add((Duration(days: 11))),
              DateTime.now().add((Duration(days: 17)))
            ]),
      ),
    ),
  );
}
```

## Explore Flutter examples and demos

You can check out many examples of Syncfusion’s Flutter widgets in this [GitHub location](https://github.com/syncfusion/flutter-examples)
. Additionally, take a look at our demo app in the [Play Store](https://play.google.com/store/apps/details?id=com.syncfusion.flutter.examples&hl=en)
 and [App Store](https://apps.apple.com/in/app/syncfusion-flutter-ui-widgets/id1475231341)
.

If you want an in-depth learning experience on how to create a complete Flutter app, be sure to read [Flutter Succinctly by Ed Freitas](https://www.syncfusion.com/ebooks/flutter-succinctly)
. It’s part of [Syncfusion’s library of free technical ebooks](https://www.syncfusion.com/ebooks)
.

## Conclusion

In this blog post, we walked through our new Syncfusion Flutter [Date Range Picker](https://www.syncfusion.com/flutter-widgets/flutter-daterangepicker)
 and its features, available with our [2020 Volume 1](https://www.syncfusion.com/forums/152921/essential-studio-2020-volume-1-release-v18-1-0-42-is-available-for-download)
 release. Try this new control and share your feedback in the comments section.

Also, if you need a new widget in the Flutter framework, please let us know in the comments section. You can also contact us through our [support forum](https://www.syncfusion.com/forums)
, [Direct-Trac](https://www.syncfusion.com/support/directtrac/incidents)
, or [feedback portal](https://www.syncfusion.com/feedback/flutter)
. As always, we are happy to assist you!
