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!

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...

Keep the Learning Going with the New Best of .conf Hub

Hello Splunkers, With .conf26 getting closer, there’s already a lot of excitement building around this year’s ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...