Hi im using ruby on rails, when i enter the date of birth on the years is just giving me from 2007 to 2012,
i have this command on my db, i bold the one that is giving me the error, the thing is i need to have all the options to select a date of birth and also to select them in the future of course
class CreatePacientes < ActiveRecord::Migration
def change
create_table :pacientes do |t|
t.string :cedula
t.string :nombre
t.string :apellido1
t.string :apellido2
**t.date :fecha_nacimiento**
t.string :genero
t.string :estado_civil
t.string :provincia
t.string :canton
t.string :distrito
t.text :otras_senas
t.string :telefono_casa
t.string :telefono_celular
t.string :correo_electronico
t.string :nacionalidad
t.integer :anos_estudio
t.string :profesion
t.string :ocupacion
t.timestamps
end
end
end
If you look at the documentation of the
date_selecthelper, you will see that it accepts these two options:What you’re seeing are the default values. Although I’m not sure why your max is 2012, not 2017, because it should be +/- 5 years. Anyway, try to pass the limits to get the range you need. Or don’t use
date_selectif you need to input any year.