demarches-normaliennes/app/components/editable_champ/datetime_component/datetime_component.html.haml
2022-09-01 09:48:27 +02:00

4 lines
329 B
Text

- parsed_value = @champ.value.present? ? Time.zone.parse(@champ.value) : nil
.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)