title: jQuery change date format form
body: <p>I have one function that needs to select dates and show it in link (after press button Submit) like this</p>
  
  <blockquote>
    <p>?date_from=2018-09-18&amp;date_to=2018-10-09</p>
  </blockquote>
  
  <p>But problem is in input, where I have to select dates format is like 18-Sep-2018, so I have to format this <code>18-Sep-2018</code> to <code>2018-10-18</code>, but still have to show like <code>18-Sep-2018</code> in input.</p>
  
  <p><strong>Here is the code</strong></p>
  
  <pre><code>&lt;form class="rates"&gt;
      &lt;div class="date-range date-range-main"&gt;
          @include('components/input_date', [
              'name' =&gt; 'date_from',
              'inline' =&gt; TRUE,
              'value' =&gt; $date_range-&gt;get_start(),
              'label' =&gt; ''
          ])
          -
          @include('components/input_date', [
              'name' =&gt; 'date_to',
              'inline' =&gt; TRUE,
              'value' =&gt; $date_range-&gt;get_end(),
              'label' =&gt; ''
          ])
      &lt;/div&gt;
      &lt;button class="btn btn-primary" type="submit"&gt;
          {{uctrans('labels.search')}}
      &lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>So now when I run this function link is like </p>
  
  <blockquote>
    <p>?date_from=30+Oct+2018&amp;date_to=20+Nov+2018</p>
  </blockquote>
  
  <p>and it needs to be like</p>
  
  <blockquote>
    <p>?date_from=2018-11-20&amp;date_to=2018-12-11</p>
  </blockquote>