|
@@ -57,7 +57,7 @@ class _HomecareBedHistoryFromState extends State<HomecareBedHistoryFrom> {
|
|
|
title: '建床日期',
|
|
|
initialValue: bedConstruction.bedConstructionDate,
|
|
|
maxDateTime: bedConstruction.dischargeDate == null
|
|
|
- ? null
|
|
|
+ ? DateTime.now()
|
|
|
: DateTime.parse(bedConstruction.dischargeDate!),
|
|
|
);
|
|
|
if (result != null) {
|
|
@@ -73,12 +73,12 @@ class _HomecareBedHistoryFromState extends State<HomecareBedHistoryFrom> {
|
|
|
content: bedConstruction.dischargeDate,
|
|
|
onTap: () async {
|
|
|
final result = await _showDateDialog(
|
|
|
- title: '撤床日期',
|
|
|
- initialValue: bedConstruction.dischargeDate,
|
|
|
- minDateTime: bedConstruction.bedConstructionDate == null
|
|
|
- ? null
|
|
|
- : DateTime.parse(bedConstruction.bedConstructionDate!),
|
|
|
- );
|
|
|
+ title: '撤床日期',
|
|
|
+ initialValue: bedConstruction.dischargeDate,
|
|
|
+ minDateTime: bedConstruction.bedConstructionDate == null
|
|
|
+ ? null
|
|
|
+ : DateTime.parse(bedConstruction.bedConstructionDate!),
|
|
|
+ maxDateTime: DateTime.now());
|
|
|
if (result != null) {
|
|
|
bedConstruction.dischargeDate =
|
|
|
DateFormat("yyyy-MM-dd").format(result);
|
|
@@ -160,8 +160,8 @@ class _HomecareBedHistoryFromState extends State<HomecareBedHistoryFrom> {
|
|
|
result = await showDatePicker(
|
|
|
context: Get.context!,
|
|
|
initialDate: initValue,
|
|
|
- firstDate: maxDateTime ?? DateTime(1900),
|
|
|
- lastDate: minDateTime ?? DateTime(2100),
|
|
|
+ firstDate: minDateTime ?? DateTime(1900),
|
|
|
+ lastDate: maxDateTime ?? DateTime(2100),
|
|
|
);
|
|
|
} else {
|
|
|
result = await VDialogDate(
|