universal_table/app/views/admin/universal_tables/_date_field.html.erb

18 lines
768 B
Plaintext
Raw Normal View History

2015-11-13 13:10:00 +00:00
<div class="control-group">
<%= f.label :date, column.title, :class => "control-label" %>
<div class="controls">
<div>
<div class="default_picker input-append" style="">
<%= f.text_field :date, :value => (date_field.date.strftime("%Y/%m/%d %H:%M") rescue ""), :placeholder => "YYYY/MM/DD HH:MM", :data => {:format => "yyyy/MM/dd hh:mm"} %>
<span class="add-on clearDate"><i class="icons-cross-3"></i></span>
<span class="add-on iconbtn"><i data-date-icon="icons-calendar" data-time-icon="icons-clock" class="icons-calendar"></i></span>
</div>
</div>
</div>
<% if !date_field.new_record? %>
<%= f.hidden_field :id %>
<% else %>
<%= f.hidden_field :table_column_id, :value => column.id %>
<% end %>
</div>