如何设置jQuery日期选择器的年份范围:1900至当前年份,或1900至9999
大家好,我使用的Jquery Date picker
对我来说足够好了.但是我有一个小问题,即我想将Start year
从1900
和End year
设置为Current Year
或9999
.
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
..
在脚本中,我找到了year range
yearRange: 'c-100:c+100'
如果我前进到类似1800
之类的东西,我将看不到current year
.我应该在这里进行哪些更改,以便以这样的方式查看我的岁月,即年份应为1900-current year
或1900-9999
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
尝试一下:
datepick({yearRange: '1900:' + new Date().getFullYear()});