chnaged date format
This commit is contained in:
parent
a1bd9a3108
commit
f281eb5b50
@ -157,6 +157,7 @@ class _ReimbursementBottomSheetState extends State<ReimbursementBottomSheet> {
|
||||
decoration: _inputDecoration("Enter transaction ID"),
|
||||
),
|
||||
MySpacing.height(16),
|
||||
MySpacing.height(16),
|
||||
MyText.labelMedium("Reimbursement Date"),
|
||||
MySpacing.height(8),
|
||||
GestureDetector(
|
||||
@ -165,12 +166,13 @@ class _ReimbursementBottomSheetState extends State<ReimbursementBottomSheet> {
|
||||
context: context,
|
||||
initialDate: dateStr.value.isEmpty
|
||||
? DateTime.now()
|
||||
: DateFormat('yyyy-MM-dd').parse(dateStr.value),
|
||||
firstDate: DateTime(2020),
|
||||
: DateFormat('dd MMM yyyy').parse(dateStr.value),
|
||||
firstDate: DateTime(2020),
|
||||
lastDate: DateTime(2100),
|
||||
);
|
||||
if (picked != null) {
|
||||
dateStr.value = DateFormat('yyyy-MM-dd').format(picked);
|
||||
dateStr.value =
|
||||
DateFormat('dd MMM yyyy').format(picked);
|
||||
}
|
||||
},
|
||||
child: AbsorbPointer(
|
||||
|
Loading…
x
Reference in New Issue
Block a user