How can I prevent users choosing a date and a time that already appears in my dataset.

I have created a User Input form for submission. All data is submitted to a dataset. How do I prevent another user choosing a date and time that already exists in the dataset. The saved date and time are 2 separate fields and both together cannot appear twice. I am using a datepicker for user interaction but do not know how to set restrictions if a date has already been booked. Please can someone advise me.