flutter_datetime_picker
A date-time picker in the flutter is a UI component that makes it easier to help people quickly select dates, times,.. etc. It is very useful and important in your application. Here is a date-time picker inspired by a Cupertino-date-picker. It will provide you with a lot of abilities to set dates or times.
Besides, you utterly can choose to pick a date, time, or date in some languages such as English, Dutch, or Chinese, and you can even customize the content of your own picker by your way.
Date picker | Time picker | Date & Time picker (Chinese) | Date & Time picker (English-America) | Date & Time picker (Dutch) |
---|---|---|---|---|
![]() | ![]() | ![]() | ![]() | ![]() |
Usage
To do this, follow the steps below:
FlatButton(
onPressed: () {
DatePicker.showDatePicker(context,
showTitleActions: true,
minTime: DateTime(2018, 3, 5),
maxTime: DateTime(2019, 6, 7), onChanged: (date) {
print('change $date');
}, onConfirm: (date) {
print('confirm $date');
}, currentTime: DateTime.now(), locale: LocaleType.zh);
},
child: Text(
'show date time picker (Chinese)',
style: TextStyle(color: Colors.blue),
));
https://github.com/Realank/flutter_datetime_picker