Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #538262

    Hi

    I am trying to use this code to perform validation on a DatePicker on dev2.electrixinternational.com/request-a-quote/

    
    
    // CT Limit available date range in the checkout DatePicker
    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
     * See: http://jqueryui.com/datepicker/#min-max
    */
    function woo_add_checkout_field_date_range_limit() {
    	if ( is_checkout() ) {
    	?>
    	<script type="text/javascript"> 
    		jQuery( document ).ready( function ( e ) {
    			jQuery(function() {
    				jQuery( "#required_by_date_field" ).datepicker({ minDate: 1 });
    			});
    		});
    	</script>
    	<?php
    	}
    }

    It isnt working – I am not sure if it is because I am not referencing the field correctly.

    I basically want the field so someone can only select >= TODAY (they shouldnt pick a date in the past).

    Does anyone have any suggestions?

    Thanks

    #538307

    Hey richardelectrix!

    You can find where we setup the datepicker around line 500 in the /enfold/framework/php/class-form-generator.php file.

    That is for our contact form though and it looks like your trying to change the one used with Woocommerce. It would be best to contact Woocommerce support about this.

    Regards,
    Elliott

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.