Skip to content

Commit d20c9d0

Browse files
committed
date/time uses datetime_picker_formfield plugin added dateTimePicker
Initially using my own implementation, someone else does it better
1 parent e7526b3 commit d20c9d0

File tree

6 files changed

+226
-208
lines changed

6 files changed

+226
-208
lines changed

.idea/libraries/Dart_Packages.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/lib/main.dart

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ class MyHomePage extends StatelessWidget {
418418
type: FormBuilderInput.TYPE_PHONE,
419419
attribute: "phone",
420420
label: "Phone",
421-
hint: "Including country code (+254)"
421+
hint: "Including country code"
422422
//require: true,
423423
),
424424
FormBuilderInput.password(
@@ -427,15 +427,24 @@ class MyHomePage extends StatelessWidget {
427427
min: 8,
428428
),
429429
FormBuilderInput.datePicker(
430-
label: "Date of Birth",
431-
readonly: true,
432-
attribute: "dob",
433-
firstDate: DateTime(1970),
434-
lastDate: DateTime.now().add(Duration(days: 1)),
435-
format: 'dd, MM yyyy'),
430+
label: "Date of Birth",
431+
readonly: true,
432+
attribute: "dob",
433+
firstDate: DateTime(1970),
434+
lastDate: DateTime.now().add(Duration(days: 1)),
435+
format: 'dd, MM yyyy',
436+
),
436437
FormBuilderInput.timePicker(
438+
label: "Alarm Time",
439+
attribute: "alarm",
440+
require: true,
441+
),
442+
FormBuilderInput.dateTimePicker(
437443
label: "Appointment Time",
438-
attribute: "time",
444+
attribute: "appointment_time",
445+
firstDate: DateTime(1970),
446+
lastDate: DateTime.now().add(Duration(days: 1)),
447+
// format: 'dd, MM yyyy hh:mm',
439448
),
440449
FormBuilderInput.checkboxList(
441450
label: "The Languages of my people",

0 commit comments

Comments
 (0)