booking_calendar
booking_calendar copied to clipboard
24 slots with a duration of 1 hour every day - not possible
Hi, starting from your example code I'm trying to setup a service with a duration of 1h and the slots should be every day like: 00:00, 01:00, 02:00 ... 23:00 (so, 24 slots with a duration of 1 hour every day)
Currently the last time-slot is 22:00 instead of 23:00. I've tried any combination for bookingStart and bookingEnd. What am I doing wrong? I've seen in your gif that it must be possible to have slots like 23:00 or 23:30. Here is my code so far:
... class _AddRentalState extends State<AddRental> { final now = DateTime.now(); late BookingService mockBookingService;
@override void initState() { super.initState(); mockBookingService = BookingService( serviceName: 'CarRental', serviceDuration: 30, bookingEnd: now.endOfDay, bookingStart: now.startOfDay); }
Thanks in advance! ....