demarches-normaliennes/app/components/editable_champ/datetime_component/datetime_component.html.haml

5 lines
329 B
Text
Raw Normal View History

2022-08-12 10:45:04 +02:00
- 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)