|
@@ -113,7 +113,9 @@ class PatientListPage extends GetView<PatientListController> {
|
|
|
readOnly: true,
|
|
|
controller: TextEditingController(
|
|
|
text: DateFormat('yyyy-MM-dd').format(
|
|
|
- controller.state.startTime.value!.toLocal(),
|
|
|
+ (controller.state.startTime.value ??
|
|
|
+ DateTime.now())
|
|
|
+ .toLocal(),
|
|
|
),
|
|
|
),
|
|
|
radius: 4,
|
|
@@ -137,7 +139,9 @@ class PatientListPage extends GetView<PatientListController> {
|
|
|
initialValue: controller.state.startTime.value,
|
|
|
).show();
|
|
|
}
|
|
|
- controller.state.startTime.value = result;
|
|
|
+ if (result != null) {
|
|
|
+ controller.state.startTime.value = result;
|
|
|
+ }
|
|
|
},
|
|
|
),
|
|
|
),
|
|
@@ -151,7 +155,8 @@ class PatientListPage extends GetView<PatientListController> {
|
|
|
readOnly: true,
|
|
|
controller: TextEditingController(
|
|
|
text: DateFormat('yyyy-MM-dd').format(
|
|
|
- controller.state.endTime.value!.toLocal(),
|
|
|
+ (controller.state.endTime.value ?? DateTime.now())
|
|
|
+ .toLocal(),
|
|
|
),
|
|
|
),
|
|
|
radius: 4,
|
|
@@ -174,7 +179,9 @@ class PatientListPage extends GetView<PatientListController> {
|
|
|
initialValue: controller.state.endTime.value,
|
|
|
).show();
|
|
|
}
|
|
|
- controller.state.endTime.value = result;
|
|
|
+ if (result != null) {
|
|
|
+ controller.state.endTime.value = result;
|
|
|
+ }
|
|
|
},
|
|
|
),
|
|
|
),
|