Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Date picker › Reply To: Date picker
May 14, 2025 at 10:15 am
#53997
Keymaster
Hi!
Yes, it should be possible to do with a small custom code snippet:
add_action('wp_footer', 'wp_footer_datepicker_range_fix', 9999);
function wp_footer_datepicker_range_fix() {
?>
<script>
(function($){
setTimeout(function(){
$('.asp_w .hasDatepicker').datepicker('option', 'yearRange', '-100:+100')
}, 500);
})(jQuery);
</script>
<?php
}
Try adding this code via the Code Snippets plugin or to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.