= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { champ: champ } .datetime %input{ name: "champs['#{champ.id}']", placeholder: champ.libelle, id: "champs_#{champ.id}", value: (champ.value.split(/[ ][0-9]*:[0-9]*/).first unless champ.value.nil?), type: 'date', required: champ.mandatory } %select{ name: "time_hour['#{champ.id}']", id: "time_hour_#{champ.id}", required: champ.mandatory } - (0..23).each do |num| - num = "%.2i" %num %option{ value: num, selected: (:selected if champ.same_hour?(num)) } = num h %select{ name: "time_minute['#{champ.id}']", id: "time_minute_#{champ.id}", required: champ.mandatory } - (0..55).step(5) do |num| - num = "%.2i" %num %option{ value: num, selected: (:selected if champ.same_minute?(num)) } = num min