Skip to content
Advertisement

Validation to check no existing overlaps with previous bookings

I need to validate that a booking doesn’t overlap in date and time with an existing booking and return and error if a booking is overlapping an existing booking.

This is the code I have right now but it isn’t working, and when I make another booking that overlaps an existing booking, it is still passing through and not returning an error.

JavaScript

Advertisement

Answer

try

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement