• Resolved ilove@112

    (@bobbyng)


    Hi,

    Thank you for your great plugin. It is more convenient to add custom field in woocommerce product.

    I have a question about how can I edit the minDate for each datepicker by id.

    I tried to add below code in footer but it was unable to execute my js after ready.

    
    jQuery(document).ready(function(){
                    jQuery( "#pickup_date" ).datepicker( "option", "minDate", "+5d" );
                });
    

    So, I am wondering if you have any advise for me to do it correctly?? Thanks.

    • This topic was modified 6 years, 1 month ago by ilove@112.
Viewing 1 replies (of 1 total)
  • Hi @bobbyng,

    thanks for love our plugin, well we use .destroy() method to apply settings in datapicker, you need to:

    1. try to call your hooks with late priority
    2. try with this:

    jQuery(document).ready(function(){
                    jQuery( "#pickup_date" ).destroy();
                    jQuery( "#pickup_date" ).datepicker( "option", "minDate", "+5d" );
                });
Viewing 1 replies (of 1 total)
  • The topic ‘Adding custom JS for datepicker’ is closed to new replies.