date_time_picker
2.1.0, released 5 years ago by m3uzz.com
A Flutter widget to display a date time form field with date or clock dialogs.
What it does
A Flutter widget that extends TextField to show a date or clock dialog when tapped. It supports multiple presentation types including date, time, combined datetime, and separated datetime fields, returning a formatted string via onChanged, validator, and onSaved callbacks.
AI-written summary of version 2.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a form field that opens a date or time picker dialog.
- You want to present separate or combined date and time inputs in forms.
Skip it when
- You are building a custom calendar UI rather than a form field.
- You do not use standard text form fields for date input.
Strengths
- Supports multiple types (date, time, dateTime, dateTimeSeparated).
- Integrates well with Flutter forms using validator and onSaved callbacks.
- Allows custom date masks and selectable day predicates.
Weaknesses
- License is unknown.
- Only returns DateTime or Time strings, which may require manual parsing.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
DateTimePicker(
type: DateTimePickerType.date,
initialValue: '',
firstDate: DateTime(2000),
lastDate: DateTime(2100),
dateLabelText: 'Date',
onChanged: (val) => print(val),
validator: (val) {
print(val);
return null;
},
onSaved: (val) => print(val),
);Alternatives
Packages that do the same job and could replace date_time_picker.
- pinput
Customizable animated PIN and OTP code input widget with autofill support.
93Compare - dropdown_search
A simple, reactive, and highly customizable Flutter dropdown with search and multi-mode support.
87Compare - board_datetime_picker
Picker to select date and time for Flutter. It is both a calendar and a picker, offering a variety of options as a package.
87Compare - keyboard_actions
Add a keyboard toolbar with Done, navigation arrows, and custom panels in Flutter.
86Compare
Works with
Packages commonly used together with date_time_picker: ones it builds on, ones built on it, and its own family.