I am making a contact us form on Wix and a few users have set appointments for the day of and it’s quite impossible to keep up with that.
How can I set the Wix form’s date picker so that it only allow users to pick a date at least day after tomorrow and forward?
I’ve tried this code, but it doesn’t seem to do the trick
$w.onReady(function () {
// Get today's date
let today = new Date();
// Calculate the day after tomorrow
let dayAfterTomorrow = new Date(today);
dayAfterTomorrow.setDate(today.getDate() + 2);
// Set the minDate property to the day after tomorrow
$w("DatePicker").minDate = dayAfterTomorrow;
});
An extra question since I don’t want to create a whole other question and take up space. How can I make it so that if one user books a time another user won’t be able to book an appointment at the same time? I’m using standard Wix form Date Picker and Time inputs from their forms
Thank you