All Apps and Add-ons

Timepicker not reverting to default on page refresh

philallen1
Path Finder

I've worked with Timepickers previously and the way I am used to them working is as follows:

I enter the page and the Timepicker is set to a default value (e.g. "Last 24 hours")
I change the Timepicker value (to say, "Last 7 days")
I refresh the page
The Timepicker has reverted to its original value (in this case, "Last 24 hours")

However, when I use a Timepicker on the following XML, it doesn't revert back to its original value, but persists the most recent value:

<module name="TimeRangePicker"  layoutPanel="panel_row2_col1" autoRun="True">
    <param name="selected">last 24 hours</param>
    <module name="HiddenSavedSearch" group="Average 5 Minute Job Time Per Hour" autoRun="True">
        <param name="groupLabel">Average 5 Minute Job Time Per Hour</param>
        <param name="savedSearch">Average 5 Minute Job Time Per Hour</param>
        <module name="ViewstateAdapter">
            <param name="savedSearch">Average 5 Minute Job Time Per Hour</param>
            <module name="HiddenFieldPicker">
                <param name="strictMode">True</param>
                <module name="JobProgressIndicator">
                    <module name="EnablePreview">
                        <param name="display">False</param>
                        <param name="enable">True</param>
                        <module name="HiddenChartFormatter">
                            <module name="JSChart">
                            </module>
                            <module name="ViewRedirectorLink">
                                <param name="viewTarget">flashtimeline</param>
                            </module>
                        </module>
                    </module>
                </module>
            </module>
        </module>
    </module>
</module> 

Anyone have any ideas? It's really frustrating me!

0 Karma
1 Solution

philallen1
Path Finder

OK I figured this out. The reason why the timepicker date was being persisted was because of the following xml in the top of my code:

isPersistable="true"

I took this out and hey presto, it always reverted to default.

View solution in original post

0 Karma

philallen1
Path Finder

OK I figured this out. The reason why the timepicker date was being persisted was because of the following xml in the top of my code:

isPersistable="true"

I took this out and hey presto, it always reverted to default.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...