# Enable a date range facet on created field

plugin.tx_meilisearch.search.faceting = 1
plugin.tx_meilisearch.search.faceting.facets {
    creationDateRange {
        label = Created Between
        field = created

        type = dateRange

        # these are the default values, you do not need to specify a dateRange configuration block if the defaults work for you
        dateRange {
            start = NOW/DAY-1YEAR
            end = NOW/DAY+1YEAR
            gap = +1DAY
        }
    }
}
# Load js files
page.includeJSFooterlibs {
    solr-jquery = EXT:meilisearch/Resources/Public/JavaScript/JQuery/jquery.min.js
    solr-ui = EXT:meilisearch/Resources/Public/JavaScript/JQuery/jquery-ui.min.js
    solr-daterange = EXT:meilisearch/Resources/Public/JavaScript/facet_daterange_controller.js
}

page.includeCSS {
    solr-ui = EXT:meilisearch/Resources/Css/JQueryUi/jquery-ui.custom.css
}
