Dashboards & Visualizations

TimePicker: Limit the choices on a specifique Dashboard without touching the .conf

henriq_c
Explorer

Hi,

I have two dashboard :
- "Normal" dashboard : With the basic TimePicker.
- Another dashboard : where I want to remove 'Other'( All time) for the timepicker

How can i remove this choice in the Time Picker ?

PS : I can't (don't want to) touch the splunk files

Thanks

0 Karma
1 Solution

vnravikumar
Champion

Hi @henriq_c

Try with following CSS change (verified in splunk 7.2.4)

<form>
  <label>timepicker</label>
  <fieldset submitButton="false">
    <input type="time" token="field1" id="test">
      <label></label>
      <default>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </default>
    </input>

  </fieldset>
  <row depends="$hide$">
    <panel>
      <html>
        <style>
          div[data-test="other-column"]
          {
          display:none !important;
          }
        </style>
      </html>
    </panel>
  </row>
</form>

[Updated] Splunk 6.x

<form>
  <label>timepicker</label>
  <fieldset submitButton="false">
    <input type="time" token="field1" id="test">
      <label></label>
      <default>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </default>
    </input>
  </fieldset>
  <row depends="$hide$">
    <panel>
      <html>
        <style>

            div[data-view="views/shared/timerangepicker/dialog/Presets"] ul:last-child {
                display:none;
          }
        </style>
      </html>
    </panel>
  </row>
</form>

View solution in original post

0 Karma

vnravikumar
Champion

Hi @henriq_c

Try with following CSS change (verified in splunk 7.2.4)

<form>
  <label>timepicker</label>
  <fieldset submitButton="false">
    <input type="time" token="field1" id="test">
      <label></label>
      <default>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </default>
    </input>

  </fieldset>
  <row depends="$hide$">
    <panel>
      <html>
        <style>
          div[data-test="other-column"]
          {
          display:none !important;
          }
        </style>
      </html>
    </panel>
  </row>
</form>

[Updated] Splunk 6.x

<form>
  <label>timepicker</label>
  <fieldset submitButton="false">
    <input type="time" token="field1" id="test">
      <label></label>
      <default>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </default>
    </input>
  </fieldset>
  <row depends="$hide$">
    <panel>
      <html>
        <style>

            div[data-view="views/shared/timerangepicker/dialog/Presets"] ul:last-child {
                display:none;
          }
        </style>
      </html>
    </panel>
  </row>
</form>
0 Karma

henriq_c
Explorer

It doesnt work. It does not remove the 'Other' category from the time picker 😕

0 Karma

vnravikumar
Champion

please let me know your splunk version.

0 Karma

vnravikumar
Champion

@henriq_c i had updated code for Splunk 6.x please try and let me know.

0 Karma

henriq_c
Explorer

v7.02 (it works with the 6.x code)

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...