Configuring the date picker refiner
About the date picker refiner
Refiners, which are stored in the file Results.html at the SmartHub root level, can be added, removed, or modified. Before using refiners or making changes to any SmartHub files, see Add refiners to your search results. By default, SmartHub provides the out-of-the-box Date Picker refiner. This refiner helps users select the date interval for their query results.
The date picker code in the SmartHub file Results.html is shown here:
Modify the date picker refiner
The default interval for the date picker refiner is auto. The interval for the date picker is changed based on current query. You can modify this by specifying the options:
data-startdata-end
If you want data-end to be the current date, remove data-end from the configuration and current date will be displayed.
You can also specify the default state, which out-of-the-box, comes as collapsed.
This refiner uses the JavaScript component daterangepicker that has several configuration options available. You can specify these options by modifying the data-raw-options option.
The data-raw-options value must be in JSON format.