date_input_formatter

Creator: coderz1093

Last updated:

0 purchases

date_input_formatter Image
date_input_formatter Images

Languages

Categories

Add to Cart

Description:

date input formatter

DateInputFormatter #
A Dart package that provides a custom TextInputFormatter for formatting and validating date input in Flutter.
Note: This package is the improved version of pattern_formatter package by adding validations to DateInputFormatter.
Installation #
Add dateinputformatter as a dependency in your pubspec.yaml file:
dependencies:
dateinputformatter: ^1.0.0
copied to clipboard
How to use #
import 'package:date_input_formatter/date_input_formatter.dart';
copied to clipboard
Usage #
I strongly suggest these below parts while using this package to prevent undesired problems:

set enableInteractiveSelection to false,
also use FilteringTextInputFormatter.allow(RegExp(r'[0-9/-]'))

TextField(
enableInteractiveSelection: false,
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[0-9/-]')),
DateInputFormatter(),
],
decoration: const InputDecoration(border: OutlineInputBorder()),
),
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.