date_text_masked 1.0.0 copy "date_text_masked: ^1.0.0" to clipboard
date_text_masked: ^1.0.0 copied to clipboard

This plugin uses the TextFormField with mask for dates and converts from string to DateTime automatically.

Date Text Masked

Status GitHub Issues GitHub Pull Requests License



📝 Table of Contents #

🧐 About #

This package helps you to create a text field with date mask, this field can be added an icon that calls the showDatePicker and gives to the user these two options to type the date.

🏁 Getting Started #

Prerequisites #

Installing #

Follow the instructions.

🎈 Usage #

You can view the complete example on example project and the following example on Home Page example.


DateTextFormField(
    onValidate: (date) {            // Execute this function when the form is validated.
      print(date);
    },
    validator: ((date) {            // Executed to validate the date, true if is validated and false if no.
      return true;
    }),
    labelFail: "Invalid date",      // The error that will be show
    decoration: InputDecoration(),  // Decoration to the widget
    showDatePicker: true,
    dateFormat: 'yyyy-dd-mm',       // Date format to the mask, 'yyyy' is the year, 'dd' is the day and 'mm' is the month
    initialData: null,              // Initial date
    firstDate: DateTime(1900),      // First Date to the showPicker if is enabled
    lastDate: DateTime(2100),       // Last Date to the showPicker if is enabled
),

⛏️ Built Using #

✍️ Authors #

See also the list of contributors who participated in this project.

7
likes
40
pub points
13%
popularity

Publisher

verified publisherpolazzo.dev

This plugin uses the TextFormField with mask for dates and converts from string to DateTime automatically.

Homepage
Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

bloc_pattern, flutter, rxdart

More

Packages that depend on date_text_masked