Hi I am using pickdate and I am having field this in my view :
<%= f.text_field :date_of_birth,:placeholder =>'Select Date',
:class => 'datepicker picker_input' %>
So in this I have this jquery
$('.datepicker').pickadate({
format: 'dd/mm/yyyy',
selectMonths: true,
selectYears: 60
});
So it gives me years from 1985 to 2045 but I want years from 1945 to current_year. How to fetch this with the help of pickadate. Please guide me. Thanks in advance.
Try setting the max
option to true
$('.datepicker').pickadate({
format: 'dd/mm/yyyy',
selectMonths: true,
selectYears: 60,
max: true
});
Try this;
$('.datepicker').pickadate({
format: 'dd/mm/yyyy',
selectMonths: true,
selectYears: 70,
max: true
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With