flutter_rounded_date_picker
The Flutter plugin that help you can choose dates and years with rounded calendars and customizable themes.
Installing
Add dependencies in pubspec.yaml file. Add 2 things in it including flutter_localizations
Importing
import packages into your dart.
Initialize localizations
Add localization delegates in MaterialApp Widget and add languages that your app supports.
Show Date Picker
Show date picker which you can specify a date that allows users to choose.
Show Year Picker
Show year picker which you can specify a year start and end that allows users to choose.
Theme
You can assign themes to the date picker by using ThemeData class and PrimarySwatch.
Dark theme
Custom Theme with ThemeData
Customize Date Picker
You can use styleDatePicker field for date picker style such as font size, weight, text color each part in the date picker.
Example custom font size and padding for displaying on a Tablet. (Pixel C, iPad 9.7")
Custom action button and text on button.
Added the action button and the button's custom text.
Custom weekday header text.
Customize the header of the weekday.
Custom disabled date.
Add closed date cannot be selected.
Custom callback on tap day.
Add callback when tap on day.
Custom builder day on date picker.
Customize the display format of the day widget.
Image Background Header
Use images as the header of the date picker and you can also add more details.
- You need to specify the path of images in your asset (pubspec.yaml).
Customize Font in Date Picker
You can adjust the Font-family in the date picker.
- You need to specify the path of font in your fonts (pubspec.yaml).
Date Picker Locale
You can set the date picker locale. By specifying the language code and country code.
As of April 2019, this package supports about 52 languages.
Thai and Buddhist Year
If you are using Thai language And use the Buddhist era (543 BCE). Plugins that support these capabilities.
Show Time Picker
Show time picker, all feature of date picker is available (except description)
Cupertino Date Picker
Show date and duration picker iOS style.
Installing
Add Flutter Cupertino Localizations in dependencies pub.yaml.
Initialize localizations
Add CupertinoLocalizations delegate to localizations delegate on your App.
The cupertino date picker will use current app locale in picker.
Show Cupertino Date Picker
Call the method for displaying date picker.
The callback date time instance will be return with onDateTimeChange.
More Cupertino Date Picker Mode
using Thai and Buddhist Year
Cupertino Duration Picker
in iOS , Flutter cupertino support duration and timer picker.
More Cupertino Duration Picker Mode