Created
January 23, 2014 17:58
-
-
Save corsonr/8583524 to your computer and use it in GitHub Desktop.
WooCommerce / Checkout field editor: define range dates for datepicker field type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment