DatePickerFieldBuilder

 

DatePickerFieldBuilder is a TextFormField that emits DateTimes and helps show Material, Cupertino, and other style picker dialogs.

 

Plugin used

On click of calendar icon, Calendar pops up

datetime_picker_formfield: ^2.0.0

 

Features

  • isRequired : Developers can make a field mandatory / non-mandatory for the users based on the isRequired value as true/false. (*) indicates mandatory field.

  • requiredMessage : Customise your error validation message using requiredMessage variable

  • firstDate : firstDate is the date, from which the calendar starts. By default, it is selected as the first date of the year 1900.

  • lastDate : lastDate is the date, till which the dates can be selected from the calendar. By default, it i selected as the last date of the year 2100.

  • initialDate : If we want to get the date selected by default , then we can set that date value to initialDate variable. By default, it is selected as today’s date

 

Widgets used from Flutter Material Library

SL No

Widgets

Description

SL No

Widgets

Description

1

AbsorbPointer()

absorbs pointers during hit testing.

2

InputDecoration()

Text Box Decoration

 

Files Path :

Primary Files : https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/widgets/DatePickerFieldBuilder.dart