This patch will fix the "save setting" bug. I was unable to fix the other bug...

Contribution Date
Technology
Contribution Project
Contribution Details

This patch will fix the "save setting" bug. I was unable to fix the other bug:

I noticed that when it is set to auto and I adjust the slider back a few years (the search results were for news articles from 1999 to current) the page reloaded and I could not longer set it back to 2012. The highest option was now 2009 which is what I had selected.

I was checking query_type_numeric_range.inc and there I saw #global_range_min and #global_range_max are getting assigned. I tried to replicate that part of code for date_range query type, but was unable to do so. May be we cannot get max and min range for dates - I'm not sure though.

My requirement was:

  • Create a date slider so that we can sort results according to year, say show all results published between 2013 to 2017

My workaround:

  • Create date field
  • Create an integer field
  • In node form, hide the integer field and set it's value (the year) in a custom submit callback. We will get the year from date field in $form_state and then assign it to integer field
  • Use the integer field as date slider

This is not the correct approach :( I would like to see this feature in future release of facetapi_slider module.

Thanks :)

Issue Status
Active
Contribution Author
Files count
1
Patches count
1