date_input_form_field
date_input_form_field
is a widget for easy date input within a Form, supporting various formats. It is similar to the TextFormField
widget.
It is a simple widget that wraps a FormField
and provides a (String
,DateTime
) object as a result. It supports various date formats and can be easily customized. It can be used with any Form
.
Usage
To use this plugin, add date_input_form_field
as a dependency in your pubspec.yaml file.
dependencies:
date_input_form_field: ^1.2.0
Example
Import the file to your project
import 'package:date_input_form_field/date_input_form_field.dart';
Use the widget as follows:
DateInputFormField(
autovalidateMode: AutovalidateMode.onUserInteraction,
format: 'dd/MM/yyyy',
controller: controller,
decoration: const InputDecoration(
labelText: 'Date of Birth',
border: OutlineInputBorder(),
),
),
Issues & Feedback
If you wish to contribute to this repo, welcome to Pull Requests.
Star ⭐ the repo if you find it useful 🤩🤩. we are open to enhancements
, bug-fixes
& suggestions
. feel free to open an issue.
License
MIT License