I'm creating a booking app, so user can view all available hours to book.
But I have a issue with the calendar
- When the user wants to pick a time in the current day, it should only show the left hours of the day (not hours that have past), because he should not book anytime in the past. when the page first uploads it shows only the next hours, but when I choose another day and come back to today, it shows all the hours even the ones in the past.
Here is the code I'm using to get available time slots:
Please help me fix these two issues related to the calendar.