If anyone wants to update their site with the minDate as a temporary fix without having to rollback PPOM to a different version, as I have for a client, then add this code in woocommerce-product-addon/js/ppom.inputs.js at line 145 just below the if (input.no_weekends === 'on') { ... }
if statement:
if( input.default_value.trim().length > 0){
var min_date = input.default_value.trim();
InputSelector.datepicker('option', 'minDate', min_date);
}
Then use the “Default Date” field in your PPOM meta group to add the min date back into the fold. I prefer the relative date (e.g. +10d or +10 for days).
/* ===================== */
I have no idea why @nmedia changed minDate
to defaultDate
. It isn’t even being used in the JavaScript code to generate the jQuery date field. Also, the example shown in the PPOM meta group doesn’t show the full usage of defaultDate and has incorrect information as well. defaultDate can be a specified date (2022-02-21) or a relative date (+1m +7d). A date format, as shown in the PPOM meta editor of YYYY-MM-DD, won’t work for the defaultDate option.
https://api.jqueryui.com/datepicker/#option-defaultDate