Hi all i used the Jquery Date picker
which works well enough for me. But i am having a small issue i.e i would like to set the Start year
from 1900
and End year
to Current Year
or 9999
..
In the script i found this for year range
yearRange: 'c-100:c+100'
If i move forward to some thing like 1800
i am unable to see the current year
.. What changes should i do here in order to see my years in a such a way that the years should be 1900-current year
or 1900-9999
I tried this which works for me but as it is loading when the calendar loads it taking much time when my application runs
datepick({yearRange: '1900:9999'});
So any better option than this to achieve as per my requirement
There's a changeYear property on the datepicker that you can set to true . This will render a select list from which you can choose the year you'd like. Save this answer.
The requirement is also to be able to use dates in the format "dd-MMM-yy". For example, in the first date field, the user selects 26-Nov-16. Then, when they click on the date picker for the second date field, the earliest date they are able to select is 26 Nov.
I will suggest to add formate on datepicker as "YYYY" so it will only show years inside it.
try this:
datepick({yearRange: '1900:' + new Date().getFullYear()});
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