Aurangajeb

Disable specific past date of date/time field

Jul 27th, 2021 (edited)
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.48 KB | None | 0 0
  1. // Use a 3rd-party plugin like (https://wordpress.org/plugins/custom-css-js/) to inject the below JQuery
  2.  
  3. jQuery(document).ready(function( $ ){
  4. // This will hide past 10days from WPUF date/time field
  5.   $("#wpuf-date-dob").datepicker( // your date field's id https://prnt.sc/1gjzyg3
  6.          {
  7.            minDate: -10, // increase/decrease pastDate as you wish
  8.            beforeShow: function() {
  9.            $(this).datepicker('option', 'maxDate');
  10.           }
  11.        });
  12. });
  13.  
Add Comment
Please, Sign In to add comment