title: How to use the selected date on the previous page?
body: <p>How to use the selected date on the previous page? </p>
  
  <p>We get the value date:</p>
  
  <pre><code>&lt;%= form_tag :action =&gt; 'method_name' do %&gt;
    &lt;%= text_field_tag('datetimepicker12', nil, options = { :onchange =&gt; "this.form.submit()"}) %&gt;
    &lt;% end %&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>def  selectday
  
   end
  
  def method_name
    @date=params[:datetimepicker12]
    redirect_to selectday_path(@date)
  end
  </code></pre>
  
  <p>view selectday receives parameters:</p>
  
  <pre><code>Request
  
  Parameters:
  
  {"format"=&gt;"24-06-2015"}
  </code></pre>
  
  <p>Here it is necessary to print the selected date. Call object in selectday view, but no output it: </p>
  
  <pre><code>&lt;span&gt; &lt;%= @date %&gt;&lt;/span&gt;
  </code></pre>