8000 Update DateTime.dart · UntaArabia/flutter-code-snippets@6d76a57 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 6d76a57

Browse files
authored
Update DateTime.dart
1 parent 4bf1866 commit 6d76a57

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

DateTime.dart

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
11

2+
3+
//Date time field demo
4+
DateTimeFormField(
5+
mode: DateTimeFieldPickerMode.date,
6+
decoration: const InputDecoration(
7+
hintStyle: TextStyle(color: Colors.black45),
8+
errorStyle: TextStyle(color: Colors.redAccent),
9+
border: OutlineInputBorder(),
10+
suffixIcon: Icon(Icons.event_note,color: Colors.black,),
11+
labelStyle:TextStyle(fontSize: 20,color: Colors.grey,letterSpacing: 1.2),
12+
labelText: 'Date of birth',
13+
),
14+
// autovalidateMode: AutovalidateMode.always,
15+
// validator: (e) =>
16+
// (e?.day ?? 0) == 1 ? 'Please not the first day ' : null,
17+
onDateSelected: (DateTime value) {
18+
print(value);
19+
},
20+
),

0 commit comments

Comments
 (0)
0