**I need to update the function.php file so that its showing 99 years not just 20 years, I am running Bizberg theme
Tried this, and it failed to give me an extended range, the issues is the scroll bar still only allows 20 years, I need99**
function extend_date_of_birth_range() {
?>
<script>
jQuery(function($) {
var currentYear = new Date().getFullYear();
var startYear = currentYear - 99;
var endYear = currentYear - 10;
// Replace "billing_date_of_birth" with the ID or name of your date of birth field
$('#billing_date_of_birth').datepicker('option', {
yearRange: startYear + ':' + endYear
});
});
</script>
<?php
}
add_action('wp_footer', 'extend_date_of_birth_range');
2
Answers
You can use like this:
and put the "dateRange" variable as below:
Add this function in function.php file, hope this will help