Restrict the allowed dates for the DatePicker Field in WooCommerce Checkout Manager

You can limit the allowed dates for the DatePicker Field Type so that only specific dates are accepted (e.g. today’s date onward, or up to 3 months from today).

Add the following PHP snippets to your current WordPress Theme’s functions.php file to limit the DatePicker Field to only accept dates from today’s date forward. You can apply other DatePicker rules (jQuery UI) using the below method.

View Code

 

Add a month and year dropdown to the DatePicker Field in WooCommerce Checkout Manager

You can extend the behaviour of the default DatePicker Checkout Field in WooCommerce Checkout Manager by hooking into our exposed WordPress Filters. In the below example we add a year and month dropdown to the DatePicker Checkout Field.

Add the following PHP snippets to your current WordPress Theme’s functions.php file:

Billing Section

View Code

Shipping Section

View Code

Additional Section

View Code