Applying global Time filter within a visualization to other dates

Hi,
I'm creating a visualization and I need to filter some dates using the same time range selected in the time picker and I simply don't know how to do so.

Basically, I'm creating a visualization based on an index that contains several dates.
The "main" one, event_date is filtered by the selected date range (top right of the screen).

I'd like to apply this selected date range to another date (sub_event_date) within the visualization.
In other terms, I'd like to know what to write for lt and gte in order to inherit global time range.

        {
          "range": {
        "sub_event_date": {
          "gte": "??? Inherit global time range",
          "lt": "??? Inherit global time range"
        }
          }
        }

I could not find anything on this topic. Is it something possible ?

Thanks a lot for your answers.

Thanks

Hi @Thomas_Pierrot, welcome to the community :wave:

You can get current global time range from time filter service in data plugin:

Then you can use it to build your custom range filter

Hi @dosant
Thanks a lot for your answer.
I'll try and let you know :slight_smile:
Thanks !

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.