Show the booked timeslots as occupied and the date in the calendar of User Booking databse - Node.js

Hello All,

I am creating a user database for booking appointments for a doctor website. I would like to show the booked time slots as occupied (not selectable) and once whole slots for the day are occupied then mark the day as occupied (not selectable).
I am not finding a way on how this can be achieved using MongoDB.
I am using node.js to create my website.
Is there any function/datatype/method that i can use to achieve this?
Please also recommend if this cannot be achieved with Node.js then would React be a better way to do it and how?
I would highly appreciate the knowledge sharing.