Version Number Below:
Web Form Builder version 2.5 Build 5437
I added the following code to jquery.ui.datepicker to disable all historic days and + 2 days from whatever is todays date (meaning today and tomorrow are always unavailable for selection).
This is working perfectly as the unwanted dates are not displayed for selection.
var dateTime = new Date();
var hour = dateTime.getHours();
//If Hour is greater or equals to 8AM
if(hour >= 08){
//Disable all past days including tomorrow and today
$(this).datepicker( "option", "minDate", "+2" );
}
},
However, people are getting around this by doing the following:
If someone selects from the calendar first available date (say; 13th June) then once the date is selected it is displayed in the form field like this "06/13/2019"
The person making the booking then just clicks in the form field and they can edit it to todays date by simply highlighting 13 and typing in 11.
So my question is this:
Once someone has selected the date from the calendar is there any way of stopping them from manually editing this date by inputting a new date by typing over the selected date?