I'm using search_api_solr as my search.

Normally date facets will give you a list of years.
Then when you select a year you get new options to select a month.
Then when you select a month you get new options to select a day.

I have attached a (not very good, sorry) screenshot that demonstrates this.

With the select widget you get year options, but then when you select a year that is the end of it - month options are not added to the select field.

Comments

pfrenssen’s picture

This might be related to #1446112: select dropdown disappears when an item is selected which discusses hierarchical selects.

jody lynn’s picture

Category: bug » feature

I think this is the same request as #1536010: Dependent Drop down Facets

rooby’s picture

It does seem to be very similar functioanlity wise.

autopoietic’s picture

Version: » 7.x-1.x-dev
Issue summary: View changes
StatusFileSize
new638 bytes

For my purposes this patch seems to work.

The approach is to check if we only have one item in the select list, and if there is, check for child items (eg months). If there are child items then these are shown instead.

autopoietic’s picture

Status: Active » Needs review
StatusFileSize
new567 bytes

Oops, sorry, there were some debug messages in that last patch. I have removed them.

grndlvl’s picture

Sounds good.

I have re-created the patch in spirit of #2336857: Unable to de-select a value. Requires patch from #16.

grndlvl’s picture

StatusFileSize
new6.42 KB

I cleaned this up a little bit so that it's easier to expand on. Still based on #2336857: Unable to de-select a value. Requires patch from #16.

  • grndlvl committed 9fcadb3 on 7.x-1.x
    Issue #1482938 by autopoietic, grndlvl: Date facets don't work normally
    
grndlvl’s picture

Status: Needs review » Closed (fixed)