Merge pull request #3329 from pengfeidong/fix_3282_datatime_with_empty_value
[fix #3282] add empty value for type_champ datatime
This commit is contained in:
commit
9728721a12
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
- parsed_value = champ.value.present? ? Time.zone.parse(champ.value) : Time.zone.now
|
||||
- parsed_value = champ.value.present? ? Time.zone.parse(champ.value) : nil
|
||||
|
||||
.datetime
|
||||
= form.datetime_select(:value, selected: parsed_value, start_year: 1950, end_year: 2100, minute_step: 5)
|
||||
= form.datetime_select(:value, selected: parsed_value, start_year: 1950, end_year: 2100, minute_step: 5, include_blank: true)
|
||||
|
|
Loading…
Reference in a new issue