That's not quite what I am suggesting. I'm not saying you need to remove the delay that was added for maps. I'm talking about something else entirely - changing the timing of when the minDate option is set. The code you are using to set the date format option might work if you delay it, like we have delayed the maps geocomplete options. You could move the minDate action inside the same delayed function used to trigger the map update. This is the line of code that I'm referring to:
jQuery( ".js-wpt-date" ).datepicker("option", "minDate", "0");
In other words instead of this code:
jQuery(window).bind("load", function() {
jQuery( ".js-wpt-date" ).datepicker("option", "minDate", "0");
});
var delayed = function() {
jQuery(".js-toolset-maps-address-autocomplete").each(function(index,item){
var map = jQuery(item).closest('.js-toolset-google-map-container').find('.js-toolset-google-map-preview:eq(0)');
jQuery(item).geocomplete({'country':'DE', 'type': [], 'map': map});
});
};
jQuery(document).ready(function(){
setTimeout( delayed, 2000 );
});
...you could experiment with delaying the action that modifies the minDate option. This update would trigger the minDate action after the same delay used to trigger the geocomplete action:
var delayed = function() {
jQuery(".js-toolset-maps-address-autocomplete").each(function(index,item){
var map = jQuery(item).closest('.js-toolset-google-map-container').find('.js-toolset-google-map-preview:eq(0)');
jQuery(item).geocomplete({'country':'DE', 'type': [], 'map': map});
});
jQuery( ".js-wpt-date" ).datepicker("option", "minDate", "0");
};
jQuery(document).ready(function(){
setTimeout( delayed, 2000 );
});
Or, you could create a separate delayed function with a different time delay, specifically for modifying the datepicker minDate option separately from the maps delay:
var delayed1 = function() {
jQuery(".js-toolset-maps-address-autocomplete").each(function(index,item){
var map = jQuery(item).closest('.js-toolset-google-map-container').find('.js-toolset-google-map-preview:eq(0)');
jQuery(item).geocomplete({'country':'DE', 'type': [], 'map': map});
});
};
var delayed2 = function() {
jQuery( ".js-wpt-date" ).datepicker("option", "minDate", "0");
};
jQuery(document).ready(function(){
setTimeout( delayed1, 2000 );
setTimeout( delayed2, 3000 );
});
Again, these are just some suggestions you can try in lieu of a public JavaScript API for Forms.