demarches-normaliennes/app/views/shared/dossiers/editable_champs/_datetime.html.haml

5 lines
324 B
Text
Raw Normal View History

- parsed_value = champ.value.present? ? Time.zone.parse(champ.value) : nil
2017-08-02 14:56:08 +02:00
.datetime
= form.datetime_select(:value, id: champ.input_id, aria: { describedby: champ.describedby_id }, selected: parsed_value, start_year: datetime_start_year(parsed_value), end_year: Date.today.year + 50, minute_step: 5, include_blank: true)