how to limit appointment availability

We would like to limit appointment availability on the same day , or 24 hour before.
ex: today @9:00 am,I still have 3 spots open. client online could not see them online, next online availability will be tomorrow @ 9:00 am.
Thank you for your help.