appointments advanced booking

is it possible to restrict booking an appointment unless it is made x hours in advanced? If not currently possible how can we customize it manually?

ex. an appointment must be booked a minimum of 48 hours in advance