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!

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...

Splunk Observability for AI

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