Prevent booking of appointments for past times
diff --git a/erpnext/www/book-appointment/index.py b/erpnext/www/book-appointment/index.py
index 3370f24..d5111c8 100644
--- a/erpnext/www/book-appointment/index.py
+++ b/erpnext/www/book-appointment/index.py
@@ -37,6 +37,7 @@
         date + ' 23:59:59', format_string)
     query_start_time = _convert_to_ist(query_start_time, timezone)
     query_end_time = _convert_to_ist(query_end_time, timezone)
+    now = datetime.datetime.now()
     # Database queries
     settings = frappe.get_doc('Appointment Booking Settings')
     holiday_list = frappe.get_doc('Holiday List', settings.holiday_list)
@@ -52,7 +53,7 @@
                 dict(time=_convert_to_tz(timeslot, timezone), availability=False))
             continue
         # Check availability
-        if check_availabilty(timeslot, settings):
+        if check_availabilty(timeslot, settings) and timeslot >= now:
             converted_timeslots.append(
                 dict(time=_convert_to_tz(timeslot, timezone), availability=True))
         else: