zpaulovics / datetimepicker-rails

A date and time picker for Twitter Bootstrap in Rails using Simple Form
MIT License
174 stars 80 forks source link

datepicker always present #80

Open paulinapmk opened 8 years ago

paulinapmk commented 8 years ago

Hi, I would like to have a simple timepicker, but datepicker is always present. I tried with using the "format" option, the "pickDate: false" option but it is still there. What I am not doing?

Here is the sample of my view:

<%= simple_form_for(@hour, html: {class: 'form-inline'}, remote: true) do |f| %>
    <%= f.error_notification %>
<div class="row form-inputs">
  <%= f.input :start_time, as: :time_picker, autocomplete: :off %>
  <%= f.input :end_time, as: :time_picker, autocomplete: :off  %>
</div>
<div class="form-buttons">
  <%= f.button :submit, "Zapisz", class: "btn btn-primary" %>
  <%= link_to '<button type="button" class="btn btn-primary" title="Wstecz">Wstecz</button>'.html_safe, hours_path %>
</div>
<% end %>

and in coffee script I have $(document).ready -> $('.time_picker').datetimepicker XXX return

where XXX was one of the options I tried: format: "H:i", format: "LT" or pickDate:false

Thank you in advance for your help.

Regards, Paulina