<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: text box input for date in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/text-box-input-for-date/m-p/190875#M11906</link>
    <description>&lt;P&gt;Thanks for it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
    <pubDate>Mon, 18 Jun 2018 13:26:48 GMT</pubDate>
    <dc:creator>Chandras11</dc:creator>
    <dc:date>2018-06-18T13:26:48Z</dc:date>
    <item>
      <title>text box input for date</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/text-box-input-for-date/m-p/190871#M11902</link>
      <description>&lt;P&gt;I have a simple form that shows storage performance on a particular date using TimePicker.&lt;/P&gt;

&lt;P&gt;But TimpePicker is not practical for my report form. I want a simple text box which I can simply key in "05/25/2014", click search, and my chart shows the storage performance on that date.&lt;/P&gt;

&lt;P&gt;Is there a way to get that "05/25/2014" and put it into my search string ? Maybe some text-to-date conversion needed ? Or perhaps we put it not in search string but in the chart's parameter instead ? &lt;/P&gt;

&lt;P&gt;Here is my current xml using TimePicker&lt;/P&gt;

&lt;P&gt;&amp;lt;?xml version='1.0' encoding='utf-8'?&amp;gt;&lt;BR /&gt;
&lt;/P&gt;&lt;FORM&gt;&lt;P&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;label&amp;gt;Storage Performance Report&amp;lt;/label&amp;gt;

&amp;lt;fieldset&amp;gt;            
    &amp;lt;input type="time"&amp;gt;&amp;lt;/input&amp;gt;
&amp;lt;/fieldset&amp;gt;

&amp;lt;searchTemplate&amp;gt;
    sourcetype="iostat" | multikv | search "c5t600A0B80006E23DE000003A74C3EA04Cd0" | timechart span=10m avg(usage)
&amp;lt;/searchTemplate&amp;gt;

&amp;lt;row&amp;gt;   
    &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;Data File IOPS READ Detail&amp;lt;/title&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;area&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.nullValueMode"&amp;gt;gaps&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.layout.splitSeries"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.placement"&amp;gt;right&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.primaryAxisTitle.text"/&amp;gt;
        &amp;lt;option name="charting.secondaryAxisTitle.text"&amp;gt;READ IOPS&amp;lt;/option&amp;gt;
    &amp;lt;/chart&amp;gt;     
&amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;/P&gt;&lt;/FORM&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2014 08:46:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/text-box-input-for-date/m-p/190871#M11902</guid>
      <dc:creator>frankagustinus</dc:creator>
      <dc:date>2014-06-06T08:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: text box input for date</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/text-box-input-for-date/m-p/190872#M11903</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;    
&amp;lt;label&amp;gt;Storage Performance Report&amp;lt;/label&amp;gt;    
&amp;lt;fieldset&amp;gt;            
   &amp;lt;input type="text" token="varDate"&amp;gt;
    &amp;lt;label&amp;gt;Enter Date(format %m/%d/%Y)&amp;lt;/label&amp;gt;
    &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
   &amp;lt;/input&amp;gt;
&amp;lt;/fieldset&amp;gt;

&amp;lt;searchTemplate&amp;gt;
sourcetype="iostat" [| stats count | eval date=if("$varDate$"="",strftime(now(),"%m/%d/%Y"),"$varDate$") 
  | eval earliest=strptime(date." 00:00","%m/%d/%Y %H:%M")  | eval latest=relative_time(earliest,"+1d")
  | table earliest, latest  | format "" "" "" "" "" ""]  | multikv | search "c5t600A0B80006E23DE000003A74C3EA04Cd0" | timechart span=10m avg(usage)
&amp;lt;/searchTemplate&amp;gt;

&amp;lt;row&amp;gt;   
    &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;Data File IOPS READ Detail&amp;lt;/title&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;area&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.nullValueMode"&amp;gt;gaps&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.layout.splitSeries"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.placement"&amp;gt;right&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.primaryAxisTitle.text"/&amp;gt;
        &amp;lt;option name="charting.secondaryAxisTitle.text"&amp;gt;READ IOPS&amp;lt;/option&amp;gt;
    &amp;lt;/chart&amp;gt;     
&amp;lt;/row&amp;gt;    
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2014 13:22:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/text-box-input-for-date/m-p/190872#M11903</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-06-06T13:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: text box input for date</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/text-box-input-for-date/m-p/190873#M11904</link>
      <description>&lt;P&gt;Hi @somesoni2... This answer helped me with my code as well. However, I am wondering if we can have today's date in  as well. I read somewhere about the   to write the command but it's not working at my end. &lt;/P&gt;

&lt;P&gt;Sorry for commenting on 4 years old post. &lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 07:03:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/text-box-input-for-date/m-p/190873#M11904</guid>
      <dc:creator>Chandras11</dc:creator>
      <dc:date>2018-06-18T07:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: text box input for date</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/text-box-input-for-date/m-p/190874#M11905</link>
      <description>&lt;P&gt;@Chandras11, refer to one of my recent answers to use HTML Date input with jQuery to allow search query to pick selected from the Date input: &lt;A href="https://answers.splunk.com/answers/627432/jquery-datepicker-in-splunk.html"&gt;https://answers.splunk.com/answers/627432/jquery-datepicker-in-splunk.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 08:52:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/text-box-input-for-date/m-p/190874#M11905</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-06-18T08:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: text box input for date</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/text-box-input-for-date/m-p/190875#M11906</link>
      <description>&lt;P&gt;Thanks for it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 13:26:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/text-box-input-for-date/m-p/190875#M11906</guid>
      <dc:creator>Chandras11</dc:creator>
      <dc:date>2018-06-18T13:26:48Z</dc:date>
    </item>
  </channel>
</rss>

