From f4020af4f82d62b3c4ed1b1975375cc1902de92c Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 29 Apr 2021 17:32:15 +0300 Subject: [PATCH] date fix --- lib/screens/patients/out_patient/filter_date_page.dart | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/screens/patients/out_patient/filter_date_page.dart b/lib/screens/patients/out_patient/filter_date_page.dart index 541a70eb..e95cb425 100644 --- a/lib/screens/patients/out_patient/filter_date_page.dart +++ b/lib/screens/patients/out_patient/filter_date_page.dart @@ -259,14 +259,8 @@ class _FilterDatePageState extends State { getLastDate(OutPatientFilterType outPatientFilterType) { if (outPatientFilterType == OutPatientFilterType.Previous) { - return DateTime( - DateTime - .now() - .year +20, DateTime - .now() - .month, (DateTime - .now() - .day - 1)); + return DateTime(DateTime.now().year, DateTime.now().month, + DateTime.now().day-1); } else { return DateTime( DateTime