Michael Visser on "[Plugin: WooCommerce Checkout Manager] How to disable past dates from datepicker ?"

ساخت وبلاگ

sideeq313
Member
Posted 13 hours ago #

Hi ,
i have installed the latest version of WooCommerce Checkout Manager and had created a date picker custom filed in my Woocomerce check out page. I want to disable the past dates from date picker .any idea about to execute this operation??please help me.

https://wordpress.org/plugins/woocommerce-checkout-manager/

Hi sideeq313, you can use the following tutorial as a guide. Instead of having the following bit:

changeMonth: true,
changeYear: true

in the script replace it with:

minDate: 0

See the following resource for more information:
https://jqueryui.com/datepicker/#min-max

sideeq313
Member
Posted 10 hours ago #

Hi,
I have just go through the plugin files,and i hav eseemed a folder named as " pickers " .

(/wp-content/plugins/woocommerce-checkout-manager/includes/pickers/ ) .
here having the file named as " jquery.ui.timepicker.js ".

Is there any js file for date picker or this file is common for both ?

thanks
sideeq313

sideeq313
Member
Posted 10 hours ago #

Hi,
i have included the below code into my activated child theme .and result will be the same as previous.please help me.

<?php
function custom_wooccm_js_datepicker_additional_args() {

echo '
minDate: 0
';

}
add_action( 'wooccm_js_datepicker_additional_args', 'custom_wooccm_js_datepicker_additional_args' );
?>

Hi sideeq313, what version of WooCommercee Checkout Manager are you using and does the DatePicker field belong to the Additional Section? If not you need to change 'additional' references in that snippet to 'billing' or 'shipping'.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 291 تاريخ : سه شنبه 4 خرداد 1395 ساعت: 3:29