Dashboards & Visualizations

How can I customize my dashboard using CSS?

Nadhiya123
Explorer

How to hide the time option in the dashboard without using the css but should function in the background ?

0 Karma
1 Solution

niketn
Legend

@Nadhiya123, can you please add more information for your requirement? Do you want to Hide the Time Picket Input? Do you want to do it with or without CSS? Do you want to toggle between hide and show option? Because, if you want to always hide the Time Picker it is better to use static time in your searches.

Which version of Splunk are you using? Since, from Splunk 6.5 onward all Splunk dashboard inputs can be hidden using Hide Filters link which is available by default when Form inputs are added to the Dashboard.

If not you can use depends attribute to hide a Splunk element like Time Picker using a token which is never set in the dashboard. Following is a dummy dashboard for example.

<form>
  <label>Hide Time Picker</label>
  <fieldset submitButton="false">
  </fieldset>
  <row>
    <panel>
      <input depends="$alwaysHideTimePicker$" type="time" token="tokTime">
        <label></label>
        <default>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </default>
      </input>
      <html>
        Earliest : $tokTime.earliest$ Latest: $tokTime.latest$ 
      </html>
    </panel>
  </row>
</form>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

Nadhiya123
Explorer

Hi @niketnilay ,

I have tried both ways.
1. .
2. hideFilters='true'

Its working for other input types except time option .Exactly I need to hide the time input in the dashboard. I don't want my users to change the time. Thats my requirement.

0 Karma

niketn
Legend

@Nadhiya123, can you please add more information for your requirement? Do you want to Hide the Time Picket Input? Do you want to do it with or without CSS? Do you want to toggle between hide and show option? Because, if you want to always hide the Time Picker it is better to use static time in your searches.

Which version of Splunk are you using? Since, from Splunk 6.5 onward all Splunk dashboard inputs can be hidden using Hide Filters link which is available by default when Form inputs are added to the Dashboard.

If not you can use depends attribute to hide a Splunk element like Time Picker using a token which is never set in the dashboard. Following is a dummy dashboard for example.

<form>
  <label>Hide Time Picker</label>
  <fieldset submitButton="false">
  </fieldset>
  <row>
    <panel>
      <input depends="$alwaysHideTimePicker$" type="time" token="tokTime">
        <label></label>
        <default>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </default>
      </input>
      <html>
        Earliest : $tokTime.earliest$ Latest: $tokTime.latest$ 
      </html>
    </panel>
  </row>
</form>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

Nadhiya123
Explorer

@ niketnilay

Yes it works only on giving the row and panel syntax.

Thank you for your support!

0 Karma

kashz
Explorer

I'm constantly seeing depends="$alwaysHideCSS" and depends="$hiddenForCSS$" .
Can someone please explain this and provide some splunk / css documentation on it?

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!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...