From a7a7cb63bf55963770815b5793e6e209cba10e06 Mon Sep 17 00:00:00 2001 From: ryr0121 Date: Sun, 3 Dec 2023 17:02:01 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9E=A5=EB=B9=84/=EC=B0=A8=EB=9F=89=20?= =?UTF-8?q?=EC=98=88=EC=95=BD=20=EB=82=B4=20=EC=84=A0=ED=83=9D=20=EC=9D=BC?= =?UTF-8?q?=EC=8B=9C=20=EB=B2=84=EA=B7=B8=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../booking/screen/booking_car_screen.dart | 19 +++---------------- .../screen/booking_resource_screen.dart | 14 +++----------- 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/lib/View/booking/screen/booking_car_screen.dart b/lib/View/booking/screen/booking_car_screen.dart index ed0e5f4..2cf60e9 100644 --- a/lib/View/booking/screen/booking_car_screen.dart +++ b/lib/View/booking/screen/booking_car_screen.dart @@ -338,28 +338,15 @@ class _BookingCarScreenState extends State { }); } else { - setState(() { - startDate = (start == null) ? null : DateTime(start.year, start.month, start.day); + startDate = (start == null) ? null : DateTime(start.year, start.month, start.day, (startTime == -1) ? 0 : startTime); endDate = (end == null) - ? DateTime(start!.year, start!.month, start!.day) - : DateTime(end.year, end.month, end.day); + ? DateTime(start!.year, start!.month, start!.day, (startTime == -1) ? 0 : startTime) + : DateTime(end.year, end.month, end.day, (endTime == -1) ? 0 : endTime); }); } } - void changedStartDate(DateTime? time) { - setState(() { - startDate = (time == null) ? null : DateTime(time.year, time.month, time.day); - }); - } - - void changedEndDate(DateTime? time) { - setState(() { - endDate = (time == null) ? null : DateTime(time.year, time.month, time.day); - }); - } - void didTapResetTimeGridButton() { setState(() { startTime = -1; diff --git a/lib/View/booking/screen/booking_resource_screen.dart b/lib/View/booking/screen/booking_resource_screen.dart index 429c5ef..3d99b27 100644 --- a/lib/View/booking/screen/booking_resource_screen.dart +++ b/lib/View/booking/screen/booking_resource_screen.dart @@ -340,22 +340,14 @@ class _BookingResourceScreenState extends State { } else { setState(() { - startDate = (start == null) ? null : DateTime(start.year, start.month, start.day); + startDate = (start == null) ? null : DateTime(start.year, start.month, start.day, (startTime == -1) ? 0 : startTime); endDate = (end == null) - ? DateTime(start!.year, start!.month, start!.day) - : DateTime(end.year, end.month, end.day); + ? DateTime(start!.year, start!.month, start!.day, (startTime == -1) ? 0 : startTime) + : DateTime(end.year, end.month, end.day, (endTime == -1) ? 0 : endTime); }); } } - void changedStartDate(DateTime? time) { - setState(() { startDate = (time == null) ? null : DateTime(time.year, time.month, time.day); }); - } - - void changedEndDate(DateTime? time) { - setState(() { endDate = (time == null) ? null : DateTime(time.year, time.month, time.day); }); - } - void didTapResetTimeGridButton() { setState(() { startTime = -1;