Note that there are some explanatory texts on larger screens.

plurals
  1. PODatepicker does not display the calendar
    primarykey
    data
    text
    <p>I have in my application a form where I can chose a date from a datepicker calendar. When I refresh my page, the datepicker calendar appears when clicking the form. This is the correct behaviour.</p> <p>However when I reach the same page from another page using a link, the calendar does not appear after clicking the form. I have to refresh the page in order to make the calendar visible.</p> <p>Here is my form page:</p> <pre><code># app/views/reservations/_form.html.erb ... &lt;div class="row reservations"&gt; &lt;div class="span2 field"&gt; &lt;%= f.label :mydate %&gt;&lt;br /&gt; &lt;%= f.text_field :mydate, class: "input-append date datepicker", value: Date.today.strftime('%d-%m-%Y') %&gt; &lt;/div&gt; ... </code></pre> <p>My javascript code:</p> <pre><code># app/assets/javascripts/reservations.js.coffee $ -&gt; $('.date').datepicker({ format: 'dd-mm-yyyy' autoclose: true todayHighlight: true language: 'fr' }); </code></pre> <p>And the Gemfile:</p> <pre><code>source 'https://rubygems.org' ruby "2.0.0" # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.0.0.beta1' gem 'bootstrap-sass', '2.3.1.0' gem 'bcrypt-ruby', '3.0.1' gem 'protected_attributes' gem 'will_paginate' gem 'bootstrap-will_paginate' gem 'bootstrap-datepicker-rails' gem 'rails-i18n' gem 'pg' # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails', '~&gt; 4.0.0.beta1' gem 'coffee-rails', '~&gt; 4.0.0.beta1' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby gem 'uglifier', '&gt;= 1.0.3' end gem 'jquery-rails' # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks gem 'turbolinks' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~&gt; 1.0.1' </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload