All Projects β†’ GaspardMerten β†’ date_field

GaspardMerten / date_field

Licence: other
Flutter DateField and DateFormField

Programming Languages

dart
5743 projects
HTML
75241 projects
swift
15916 projects

Projects that are alternatives of or similar to date field

flutter syntax view
Flutter Syntax Highlighter
Stars: ✭ 88 (+166.67%)
Mutual labels:  flutter-package
rx shared preferences
πŸŒ€ Shared preferences with RxDart Stream observation ⚑️ Reactive shared preferences for Flutter 🌸Reactive stream wrapper around SharedPreferences πŸ„ Lightweight and easy-to-use 🌱 A reactive key-value store for Flutter projects. Like shared_preferences, but with Streams πŸ“• Rx Shared Preferences for Flutter 🌿 rx_shared_preferences 🌰 rx_shared_prefere…
Stars: ✭ 36 (+9.09%)
Mutual labels:  flutter-package
flutter-simple-url-preview
Simple url preview package for flutter
Stars: ✭ 30 (-9.09%)
Mutual labels:  flutter-package
advance image picker
Flutter plugin for selecting multiple images from the Android and iOS image library, taking new pictures with the camera, and edit them before using such as rotating, cropping, adding sticker/filters.
Stars: ✭ 91 (+175.76%)
Mutual labels:  flutter-package
Free-RASP-Flutter
Flutter library for improving app security and threat monitoring on Android and iOS mobile devices.
Stars: ✭ 62 (+87.88%)
Mutual labels:  flutter-package
glassmorphism
Glassmorphic UI Package For Flutter || UI ||
Stars: ✭ 45 (+36.36%)
Mutual labels:  flutter-package
getwidget-docs
Get Widgets UI library docs.
Stars: ✭ 17 (-48.48%)
Mutual labels:  flutter-package
sounds
Flutter plugin for sound. Audio recorder and player.
Stars: ✭ 74 (+124.24%)
Mutual labels:  flutter-package
flutter pytorch mobile
A flutter plugin for pytorch model inference. Supports image models as well as custom models.
Stars: ✭ 57 (+72.73%)
Mutual labels:  flutter-package
route transitions
A flutter library containing useful animations and friendly functions for routing 🚦
Stars: ✭ 43 (+30.3%)
Mutual labels:  flutter-package
seo renderer
A Flutter Web Plugin to display Text Widget as Html for SEO purpose
Stars: ✭ 103 (+212.12%)
Mutual labels:  flutter-package
time ago provider
library for generating fuzzy timestamp for example ("9 minutes ago")
Stars: ✭ 16 (-51.52%)
Mutual labels:  flutter-package
flutter bottom reveal
An animated bottom reveal widget
Stars: ✭ 15 (-54.55%)
Mutual labels:  flutter-package
flutter-app
Full Feature Todos Flutter Mobile app with fireStore integration.
Stars: ✭ 138 (+318.18%)
Mutual labels:  flutter-package
simple gesture detector
Easy to use, reliable and lightweight gesture detector for Flutter apps, exposing simple API for basic gestures
Stars: ✭ 26 (-21.21%)
Mutual labels:  flutter-package
flutter auth buttons
Auth Buttons is a flutter widget library, include buttons for authenticating with the most popular social networks.
Stars: ✭ 23 (-30.3%)
Mutual labels:  flutter-package
scrollytell
Cross-platform Scrolly Telling library built using Flutter.
Stars: ✭ 46 (+39.39%)
Mutual labels:  flutter-package
flutter scatter
A widget that displays a collection of dispersed and non-overlapping children
Stars: ✭ 85 (+157.58%)
Mutual labels:  flutter-package
Liquid
An advance flutter UI Kit for developing responsive, cross platform applications.
Stars: ✭ 27 (-18.18%)
Mutual labels:  flutter-package
fancy bar
A fancy yet beautiful animated widget for your Flutter apps
Stars: ✭ 33 (+0%)
Mutual labels:  flutter-package

date_field

pub package

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 ;) !

Usage

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  date_field: ^3.0.0

In your library add the following import:

import 'package:date_field/date_field.dart';

Getting Started

There are two widgets in this package:

  • DateTimeField
  • DateTimeFormField

It follows the usual Flutter patterns convention, meaning the DateTimeFormField extends the FormField widget and wraps a DateTimeField widget.

You can customize both of these widgets with the decoration argument which is fully supported.

You can also specify whether you would like to ask the user for a date, a time or both using the mode parameter.

Example

The following picture illustrates some things you can do with this package.

DateTimeFormField(
  decoration: const InputDecoration(
    hintStyle: TextStyle(color: Colors.black45),
    errorStyle: TextStyle(color: Colors.redAccent),
    border: OutlineInputBorder(),
    suffixIcon: Icon(Icons.event_note),
    labelText: 'Only time',
  ),
  mode: DateTimeFieldPickerMode.time,
  autovalidateMode: AutovalidateMode.always,
  validator: (e) => (e?.day ?? 0) == 1 ? 'Please not the first day' : null,
  onDateSelected: (DateTime value) {
    print(value);
  },
),

You can check the GitHub repo for a complete example.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].