Closed JeromeDesseaux closed 8 years ago
hi, @JeromeDesseaux, there is no exact workaround solution for this problem at this moment. If you use simple_form, you can build you own simple_form wrapper to fix this. see this solution but base on bootstrap framework. i suggest, you should use materialize datepicker or other external datetimepicker plugin .
hi, For my datetime_selectors I use a combination of a date_selector with the date picker and a datetime_selector (basically it's just a dropdown select) with the option ignore date set to true. Then in the controller I grab the params and refactor them to make them the 'rails way'
With slim the view code is looking like:
.input-field.col.s6
=f.text_field :start, value: @activity.start.to_date, class: "datepicker"
=f.label :start
.input-field.col.s6.timeSelectorContainer
=f.time_select :start, ignore_date: true
=f.label :start, "HH:MM"
It shows up like this
:+1:
Have you tried the suggested solution? If so can we close this issue ?
I've finally used a JQuery datetime selector. I can explain here how did I integrate it within my website if needed. If not, you can close the issue :)
Thanks for the help :D
I just have adjusted some params and I got something a little bit pretty by doing:
<div class="input-field col s12">
<%= f.datetime_select :talk_schedule, { ampm: true, time_separator: '', start_year: DateTime.now.year, order: [:day, :month, :year] }, { class: 'datepicker col s2' } %>
<%= f.label :talk_schedule, 'Fecha y hora de la ponencia', class: 'active' %>
</div>
I got this:
It may not be the better but it looks more usable.
BTW:
I don't know how to quit the -
symbol which is the separator between Date-Time parts of the attribute. Any help will come in handy.
When i try to use that it get me an error
Hi :)
First: thanks for this awesome gem! I noticed that datetime_select are rendering ugly on my pages (I can't use it or even select a single field).
I'm looking for a workaround or something :)
Thanks for the help!