WooCommerce / Checkout field editor: define range dates for datepicker field type
add_filter( 'wp_footer' , 'woo_add_checkout_field_date_range_limit' );
/**
* woo_add_checkout_field_date_range_limit
*
* @access public
* @since 1.0
* @return void
*/
function woo_add_checkout_field_date_range_limit() {
?>
<script>
jQuery(function() {
jQuery( "#date" ).datepicker({ minDate: -5, maxDate: "+1M +10D" });
});
</script>
<?php
}