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!

Why You Can't Miss .conf25: Unleashing the Power of Agentic AI with Splunk & Cisco

The Defining Technology Movement of Our Lifetime The advent of agentic AI is arguably the defining technology ...

Deep Dive into Federated Analytics: Unlocking the Full Power of Your Security Data

In today’s complex digital landscape, security teams face increasing pressure to protect sprawling data across ...

Your summer travels continue with new course releases

Summer in the Northern hemisphere is in full swing, and is often a time to travel and explore. If your summer ...