Dashboards & Visualizations

Reset timepicker lable to match time token values

chiliconbeano
Path Finder

I have a dashboard containing two radio buttons, one for 'Current quarter' and one for 'Previous quarter'.  I also have a timepicker input field for customizing the time range for a query.  Following is the XML code for the input fields:

    <input type="radio" token="quarter_token" searchWhenChanged="true">
      <label>Select quarter...or...</label>
      <choice value="earliest=@qtr latest=@d">Current quarter</choice>
      <choice value="earliest=-1qtr@qtr latest=@qtr">Previous quarter</choice>
    </input>
    <input type="time" token="time_token" searchWhenChanged="true">
      <label>Select date range</label>
      <change>
        <set token="form.quarter_token"></set>
      </change>
      <default>
        <earliest>@qtr</earliest>
        <latest>@d</latest>
      </default>
    </input>

 

My question is: How can I reset the timepicker Label text to match the radio button selected time range?  Currently, if a user selects a custom time range, then selects one of the radio buttons, the timepicker label doesn't match the radio button time range selection.  For example, can I simply do the following to reset the timepicker label?

<set token="form.time_token.earliest">@qtr</set>
<set token="form.time_token.latest">@d</set>

 

In the example attachment, the timepicker lable shows 'Last 55 days' as well as the 'Previous quarter' radio button being selected.  This situation presents an inconsistent UI.

thanks in advance,

Bob

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

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...