<?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: How to Set A date field on a custom HTML form in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-Set-A-date-field-on-a-custom-HTML-form/m-p/272571#M82062</link>
    <description>&lt;P&gt;i have the same problem, i don't know if you resolved it &lt;/P&gt;</description>
    <pubDate>Tue, 23 Aug 2016 12:04:28 GMT</pubDate>
    <dc:creator>sfatnass</dc:creator>
    <dc:date>2016-08-23T12:04:28Z</dc:date>
    <item>
      <title>How to Set A date field on a custom HTML form</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Set-A-date-field-on-a-custom-HTML-form/m-p/272567#M82058</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;

&lt;P&gt;I am running Splunk ver 6.4 on CentOS release 6.6 (Final)&lt;/P&gt;

&lt;P&gt;Running web GUI on Firefox ver 46.0.1 and Chrome ver 50.0.2661.102&lt;/P&gt;

&lt;P&gt;I have a custom HTML dashboard with a form that has a date field that I'm trying to fill with the JQUERY datepicker function. I am able to get the datepicker GUI pop-up the Calendar when a user clicks on the DatePlanned field, but when the user clicks on the preferred date value the field does NOT populate.&lt;/P&gt;

&lt;P&gt;My code for the relevant field on the form looks as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    var input4 = new TextInput({
        "id": "input4",
        "value": "$form.DatePlanned$",
        "el": $('#input4')
    }, {tokens: true}).render();



 $("#input4").on('click', function(){
        $( '#input4' ).datepicker();
        $( '#input4' ).datepicker('setDate', date);

        FormUtils.handleValueChange(input4);

 });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the form looks as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;form id="formEventInfo"&amp;gt;
        &amp;lt;div class="fieldset"&amp;gt;
            &amp;lt;div class="input input-radiogroup" id="input8"&amp;gt;
                &amp;lt;label&amp;gt;MarkThisAsNonTssaEntry&amp;lt;/label&amp;gt;
            &amp;lt;/div&amp;gt;              
            &amp;lt;div class="input input-text" id="input1"&amp;gt;
                &amp;lt;label&amp;gt;PrimaryKey&amp;lt;/label&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div class="input input-text" id="input2"&amp;gt;
                &amp;lt;label&amp;gt;RFSNumber&amp;lt;/label&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;amp;lt;br/&amp;amp;gt;
            &amp;lt;div class="input input-text" id="input3"&amp;gt;
                &amp;lt;label&amp;gt;Comment&amp;lt;/label&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div class="input input-text" id="input4"&amp;gt;
                &amp;lt;label&amp;gt;DatePlanned&amp;lt;/label&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div class="input input-radiogroup" id="input5"&amp;gt;
                &amp;lt;label&amp;gt;ActionRequired&amp;lt;/label&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div class="input input-radiogroup" id="input6"&amp;gt;
                &amp;lt;label&amp;gt;MarkAsReviewed&amp;lt;/label&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div class="form-submit" id="search_btn"&amp;gt;
                &amp;lt;button class="btn btn-primary submit"&amp;gt;Submit&amp;lt;/button&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;

        &amp;lt;div&amp;gt;
            &amp;lt;div class="input input-text" id="input7"&amp;gt;
                &amp;lt;label&amp;gt;Enter a Key ID from the table below&amp;lt;/label&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;&amp;lt;button id="deleteRecord"&amp;gt;Delete Record&amp;lt;/button&amp;gt;&amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;&amp;amp;lt;br/&amp;amp;gt;
    &amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please help!&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2016 12:53:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Set-A-date-field-on-a-custom-HTML-form/m-p/272567#M82058</guid>
      <dc:creator>napomokoetle</dc:creator>
      <dc:date>2016-05-30T12:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to Set A date field on a custom HTML form</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Set-A-date-field-on-a-custom-HTML-form/m-p/272568#M82059</link>
      <description>&lt;P&gt;Have you tried using just the &lt;A href="http://docs.splunk.com/DocumentationStatic/WebFramework/1.1/"&gt;TimeRangeView&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 14:06:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Set-A-date-field-on-a-custom-HTML-form/m-p/272568#M82059</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-05-31T14:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to Set A date field on a custom HTML form</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Set-A-date-field-on-a-custom-HTML-form/m-p/272569#M82060</link>
      <description>&lt;P&gt;Here's what I tried that sort of works... &lt;/P&gt;

&lt;P&gt;The only problem is after the date is inserted into the form field, I can't get the calendar to hide way on date change!&lt;/P&gt;

&lt;P&gt;I'd appreciate any help as I have tried all sorts of tricks to hide away the calendar. But none worked!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; var input4 = new TextInput({
     "id": "input4",
     "value": "$form.DatePlanned$",
     "el": $('#input4')
 }, {tokens: true}).render();


 $("#input4").on('click', function(newValue){

    var unsubmitted_tokens = mvc.Components.get('default');
    var submitted_tokens = mvc.Components.get('submitted');

        $("#input4").datepicker({
        onSelect: function() {


                var mydate = $( '#input4' ).datepicker({ dateFormat: 'dd/mm/yy',autoClose: true});

            unsubmitted_tokens.set('form.DatePlanned', mydate.val());

            FormUtils.handleValueChange(input4);


            }


        });

    });
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jun 2016 19:05:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Set-A-date-field-on-a-custom-HTML-form/m-p/272569#M82060</guid>
      <dc:creator>napomokoetle</dc:creator>
      <dc:date>2016-06-01T19:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Set A date field on a custom HTML form</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Set-A-date-field-on-a-custom-HTML-form/m-p/272570#M82061</link>
      <description>&lt;P&gt;were you able to get this work? I'm having similar problem.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 04:34:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Set-A-date-field-on-a-custom-HTML-form/m-p/272570#M82061</guid>
      <dc:creator>shibinvarghese</dc:creator>
      <dc:date>2016-08-22T04:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to Set A date field on a custom HTML form</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Set-A-date-field-on-a-custom-HTML-form/m-p/272571#M82062</link>
      <description>&lt;P&gt;i have the same problem, i don't know if you resolved it &lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 12:04:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Set-A-date-field-on-a-custom-HTML-form/m-p/272571#M82062</guid>
      <dc:creator>sfatnass</dc:creator>
      <dc:date>2016-08-23T12:04:28Z</dc:date>
    </item>
  </channel>
</rss>

