<%= f.label :period_from, column.title, :class => "control-label" %>
<% v = !period_field.new_record? ? format_date(period_field.period_from, column.date_format, true) : "" %> <%= f.text_field :period_from, :value => v, :placeholder => column.date_format.upcase, :data => {:format => (column.date_format == "yyyy" ? "yyyy/MM" : column.date_format)}, :class => "input-small" %>
<%= f.label :period_to, "~", :class => "control-label" %>
<% v = !period_field.new_record? ? format_date(period_field.period_to, column.date_format, true) : "" %> <%= f.text_field :period_to,:value => v, :placeholder => column.date_format.upcase, :data => {:format => (column.date_format == "yyyy" ? "yyyy/MM" : column.date_format)}, :class => "input-small" %>
<% if !period_field.new_record? %> <%= f.hidden_field :id %> <% else %> <%= f.hidden_field :table_column_id, :value => column.id %> <% end %>