Dashboards & Visualizations

Time picker inherit from another time picker

PavelNed
Explorer

Hello,

I have two time pickers that I use in a dashboard. One of them sets time for whole dashboard, second one should set time for one table. Usage should be something like this:

  1. On page load, second time picker initializes with same time as the first one.
  2. On main time picker change, second time picker gets the value of main.
  3. When second time picker is changed, that one table gets it's value, other panels remain with main time picker.

My code looks like this:

 

<input type="time" token="time_picker" searchWhenChanged="true">
   <label></label>
   <default>
      <earliest>0</earliest>
      <latest></latest>
   </default>
   <change>
      <set token="time_picker_2.earliest">$time_picker.earliest$</set>
      <set token="time_picker_2.latest">$time_picker.latest$</set>
   </change>
</input>
<input type="time" token="time_picker_2" searchWhenChanged="true">
   <label></label>
   <default>
     <earliest>$time_picker.earliest$</earliest>
     <latest>$time_picker.latest$</latest>
   </default>
</input>

 

This code somehow works. If I change main time range, token for second time range updates and recreates the table. But - UI time range remains unchanged, so when main picker is changed from All time to Last 30 days, table data are from that time range, but second time picker shows from still as 1/1/1970.

Any ideas how to make time picker UI update?

Thank you.

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...