Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Projectlearn Project Based Learning | 1,582 | 2 months ago | 7 | mit | JavaScript | |||||
A curated list of project tutorials for project-based learning. | ||||||||||
Learning Resources | 94 | 12 days ago | 3 | |||||||
A repository which contains different learning resources for various development stacks. | ||||||||||
Learning Resources | 91 | 6 months ago | 2 | mit | ||||||
All the FREE learning resources in one place. These resources are strictly recommended. | ||||||||||
Navigate | 37 | 1 | 4 years ago | 6 | December 16, 2018 | 2 | other | Dart | ||
A flutter plugin for byutifull navigation with advanced routing | ||||||||||
Calendar_date_picker2 | 37 | 7 days ago | 19 | July 06, 2022 | 5 | apache-2.0 | Dart | |||
Lightweight and highly customizable calendar picker built on Flutter's original CalendarDatePicker, with support for multi and range modes. | ||||||||||
Compose Community | 26 | 2 months ago | 45 | mit | Jupyter Notebook | |||||
It is a community where we provide free and quality educations (Technical Skills) to all. | ||||||||||
Learn Google Technologies | 23 | 5 months ago | 13 | mit | Dart | |||||
It is a hacktoberfest registered repository in which anyone can contribute. This repository contains code and resources related to Google Developers technologies. This repository is powered by Google Developer Students Club MUET Jamshoro. | ||||||||||
Flutterleichtgemacht_zerotomasery | 19 | 7 months ago | Dart | |||||||
Grundlagenkurs in Dart & Flutter. Einführung in die moderne App Entwicklung mit dem Flutter Framework. | ||||||||||
Spectober_fest | 18 | 5 months ago | 13 | mit | Jupyter Notebook | |||||
A repository by Spectrum-CETB for celebrating month long festival of open-source called Hacktoberfest. | ||||||||||
Cookbook Hacktoberfest | 15 | 5 months ago | 10 | HTML | ||||||
Cookbook Method is the process of learning a programming language by building up a repository of small programs that implement specific programming concepts. |
A lightweight and customizable calendar picker based on Flutter CalendarDatePicker, with support for single date picker, range picker and multi picker.
![]() |
![]() |
![]() |
![]() |
---|---|---|---|
single mode | multi mode | range mode | dialog function |
CalendarDatePicker2 consists of two main widgets:
CalendarDatePicker2
, this widget only includes the calendar UI and will emit event whenever user taps a different date.CalendarDatePicker2WithActionButtons
, this widget includes calendar UI and the action buttons (CANCEL & OK). This widget will only emit the updated value when user taps 'OK' button.null
initialDateshowCalendarDatePicker2Dialog
Make sure to check out examples for more details.
Add the following line to pubspec.yaml
:
dependencies:
calendar_date_picker2: ^0.4.9
The complete example is available here.
CalendarDatePicker2 requires you to provide config
and value
:
config
contains the configurations for your calendar setup and UI.value
is initial values passed into your calendar picker, value
must be a List
.CalendarDatePicker2(
config: CalendarDatePicker2Config(),
value: _dates,
onValueChanged: (dates) => _dates = dates,
);
During the initialization of CalendarDatePicker2Config
the calendarType
of the config instance will by default set to CalendarDatePicker2Type.single
, so you don't have to set the calendar type specifically.
In order to use multi mode date picker, you will need to set the calendarType of config to CalendarDatePicker2Type.multi
:
CalendarDatePicker2(
config: CalendarDatePicker2Config(
calendarType: CalendarDatePicker2Type.multi,
),
value: _dates,
onValueChanged: (dates) => _dates = dates,
);
In order to use range mode date picker, you will need to set the calendarType of config to CalendarDatePicker2Type.range
:
CalendarDatePicker2(
config: CalendarDatePicker2Config(
calendarType: CalendarDatePicker2Type.range,
),
value: _dates,
onValueChanged: (dates) => _dates = dates,
);
This package includes built-in support to display calendar as a dialog. To use it, you will need to call showCalendarDatePicker2Dialog
, which takes three required arguments: context
, config
, dialogSize
:
...
var results = await showCalendarDatePicker2Dialog(
context: context,
config: CalendarDatePicker2WithActionButtonsConfig(),
dialogSize: const Size(325, 400),
value: _dates,
borderRadius: BorderRadius.circular(15),
);
...
Option | Type | Description |
---|---|---|
calendarType | CalendarDatePicker2Type? | Calendar picker type, has 3 values: single, multi, range |
firstDate | DateTime? | The earliest allowable DateTime user can select |
lastDate | DateTime? | The latest allowable DateTime user can select |
currentDate | DateTime? | The DateTime representing today which will be outlined in calendar |
calendarViewMode | DatePickerMode? | The initially displayed view of the calendar picker |
weekdayLabels | List<String>? | Custom weekday labels, should starts with Sunday |
weekdayLabelTextStyle | TextStyle? | Custom text style for weekday labels |
firstDayOfWeek | int? | Index of the first day of week, where 0 points to Sunday, and 6 points to Saturday. |
controlsHeight | double? | Custom height for calendar control toggle's height |
lastMonthIcon | Widget? | Custom icon for last month button control |
nextMonthIcon | Widget? | Custom icon for next month button control |
controlsTextStyle | TextStyle? | Custom text style for calendar mode toggle control |
dayTextStyle | TextStyle? | Custom text style for calendar day text |
selectedDayTextStyle | TextStyle? | Custom text style for selected calendar day text |
selectedDayHighlightColor | Color? | The highlight color selected day |
disabledDayTextStyle | TextStyle? | Custom text style for disabled calendar day(s) |
todayTextStyle | TextStyle? | Custom text style for current calendar day |
yearTextStyle | TextStyle? | Custom text style for years list |
selectedYearTextStyle | TextStyle? | Custom text style for selected year |
dayBorderRadius | BorderRadius? | Custom border radius for day indicator |
yearBorderRadius | BorderRadius? | Custom border radius for year indicator |
selectableDayPredicate | SelectableDayPredicate? | Function to provide full control over which dates in the calendar can be selected |
dayTextStylePredicate | CalendarDayTextStylePredicate? | Function to provide full control over calendar days text style |
dayBuilder | CalendarDayBuilder? | Function to provide full control over day widget UI |
yearBuilder | CalendarYearBuilder? | Function to provide full control over year widget UI |
disableModePicker | bool? | Flag to disable mode picker and hide the toggle icon |
centerAlignModePicker | bool? | Flag to centralize year and month text label in controls |
customModePickerIcon | Widget? | Custom icon for the mode picker button icon |
modePickerTextHandler | CalendarModePickerTextHandler? | Function to control mode picker displayed text |
Option | Type | Description |
---|---|---|
gapBetweenCalendarAndButtons | double? | The gap between calendar and action buttons |
cancelButtonTextStyle | TextStyle? | Text style for cancel button |
cancelButton | Widget? | Custom cancel button |
okButtonTextStyle | TextStyle? | Text style for ok button |
okButton | Widget? | Custom ok button |
openedFromDialog | bool? | Is the calendar opened from dialog |
closeDialogOnCancelTapped | bool? | Close dialog after user taps the CANCEL button |
closeDialogOnOkTapped | bool? | Close dialog after user taps the OK button |
buttonPadding | EdgeInsets? | Custom wrapping padding for Ok & Cancel buttons |
By using the configs above, you could make your own custom calendar picker as your need.
CalendarDatePicker2WithActionButtons(
config: CalendarDatePicker2WithActionButtonsConfig(
firstDayOfWeek: 1,
calendarType: CalendarDatePicker2Type.range,
selectedDayTextStyle: TextStyle(color: Colors.white, fontWeight: FontWeight.w700),
selectedDayHighlightColor: Colors.purple[800],
centerAlignModePicker: true,
customModePickerIcon: SizedBox(),
dayBuilder: _yourDayBuilder,
yearBuilder: _yourYearBuilder,
),
value: _dates,
onValueChanged: (dates) => _dates = dates,
);
This package has multi-language supports. To enable it, add your Locale
into the wrapping MaterialApp
:
MaterialApp(
localizationsDelegates: GlobalMaterialLocalizations.delegates,
supportedLocales: const [
Locale('en', ''),
Locale('zh', ''),
Locale('ru', ''),
Locale('es', ''),
Locale('hi', ''),
],
...
);
![]() |
![]() |
![]() |
![]() |
---|---|---|---|
**** | **** | espaol | **** |
Feel free to contribute to this project. Pull requests are welcome!
There are some tips before creating a PR:
flutter format .
if you are not using VS Codefeat:
or fix:
to your PR commit