Skip to content

Commit

Permalink
fix: 차량 예약 달력 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ryr0121 committed Dec 1, 2023
1 parent 11d358f commit 4fabb63
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions lib/View/booking/screen/booking_car_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,21 @@ class _BookingCarScreenState extends State<BookingCarScreen> {
}

void changedDate(DateTime? start, DateTime? end) {
setState(() {
startDate = (start == null) ? null : DateTime(start.year, start.month, start.day);
endDate = (end == null)
? DateTime(start!.year, start!.month, start!.day)
: DateTime(end.year, end.month, end.day);
if (start == null && end == null) {
setState(() {
startDate = null;
endDate = null;
});

print('start -> $start');
print('end -> $end');
});
} else {

setState(() {
startDate = (start == null) ? null : DateTime(start.year, start.month, start.day);
endDate = (end == null)
? DateTime(start!.year, start!.month, start!.day)
: DateTime(end.year, end.month, end.day);
});
}
}

void changedStartDate(DateTime? time) {
Expand Down

0 comments on commit 4fabb63

Please sign in to comment.