date_field/README.md

26 lines
1.1 KiB
Markdown
Raw Normal View History

2020-03-01 22:16:29 +00:00
# date_field
2020-07-19 14:53:45 +00:00
Contains DateTimeField and DateTimeFormField which allows the user to pick a DateTime from an input field! Depending on
the mode, it can ask the user the time, the date or both at the same time!
2020-03-01 22:16:29 +00:00
## Getting Started
2020-03-01 22:29:41 +00:00
The best way to discover this package is simply to check the example page!
There are two widgets in this package:
2020-07-19 14:53:45 +00:00
- DateTimeField
- DateTimeFormField
2020-03-01 22:29:41 +00:00
The second one is wrapping the first one with a FormField widget! This way you can integrate it in your form structure flawlessly.
2020-07-19 14:53:45 +00:00
The DateTimeField widget returns an InputDecorator with an Inkwell which will display a date picker (*platform responsive*) which allows the user to select the date and the time he wants!
2020-03-01 22:29:41 +00:00
You can customize the widget a lot thanks to these parameters:
2020-07-19 14:53:45 +00:00
<i>onSaved, validator, initialValue, autovalidate, enabled, firstDate, lastDate, label, dateFormat, decoration, initialDatePickerMode, mode (time, date, time and date)</i>
<img src='https://raw.githubusercontent.com/GaspardMerten/date_field/master/example/example.png' height='150px'></img>
If you want more details, I invite you to check the official documentation.