los campos de año tienen un listado de años posibles

This commit is contained in:
f 2018-12-14 11:17:34 -03:00
parent 81cd5d261b
commit 346761d164
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -1,4 +1,11 @@
= number_field_tag field_name_for_post_as_string(name),
value,
class: 'form-control',
required: template.required?
required: template.required?,
list: "#{name}_years",
min: template.min,
max: Date.today.year
%datalist{id: "#{name}_years"}
- (template.min..Date.today.year).to_a.each do |y|
%option{value: y}