Forums › Forums › Search & Filter Pro › Display Results
- This topic has 16 replies, 2 voices, and was last updated 4 years, 5 months ago by
Trevor.
-
Trevor(Private) February 1, 2021 at 3:59 pm #274830
You would need to set the
minDate
andmaxDate
of the datepicker, oryearRange
if that is all you need to do.This would require you to add some additional JavaScript to the page.
This post shows some other options being set in this way:
https://support.searchandfilter.com/forums/topic/search-by-date-for-ancient-documents/#post-184587
I am sure you can modify what is there.
Anonymous(Private) February 1, 2021 at 6:02 pm #274875Hi, Trevor
Can You say where I need to put that code, in which file?
In your example there is fixed values for yearRange and defaultDate, but I want to set date of today like min date, and don’t allow to select earlier. And for “to” date don’t allow to select earlier than selected in “from” field. Is it possible, have you an example like it?jQuery(document).on(“sf:init”, “.searchandfilter”, function(){
jQuery(“#search-filter-form-108 .sf-datepicker”).datepicker(‘option’,{
yearRange: ‘1908:1908’,
defaultDate: ‘1/1/1908’,
changeYear: false
});
});in this code 108 is id of filter?
Can you say all list of keys and arguments for datepicker option, or can you send me link of more detailed documentation? -
AuthorPosts