jQuery Datepicker 自定义年份
我使用了 http://keith-wood.name/datepick.html 中的 datepicker太棒了。
但我在控制年份范围方面遇到了问题。
这是我的代码。
$('#date_executed').datepick({
dateFormat: 'MM dd, yy',
yearRange:'2011:2012',
showOn: 'both',
buttonImageOnly: true,
buttonText: 'Calendar',
buttonImage: "images/calendar.gif"
});
我需要将 2009 年添加到年份列表中,但我不想包括 2010 年。请帮助我,谢谢。
I have used datepicker from http://keith-wood.name/datepick.html and it was great.
But I have a problem on controlling the year range.
Here's my code.
$('#date_executed').datepick({
dateFormat: 'MM dd, yy',
yearRange:'2011:2012',
showOn: 'both',
buttonImageOnly: true,
buttonText: 'Calendar',
buttonImage: "images/calendar.gif"
});
I need to add 2009 to the list of year but I don't want to include 2010. please help me thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将年份范围更改为
yearRange:'2009:2012'
,然后删除加载时的 2010 年,如下所示:Change the year range to
yearRange:'2009:2012'
then remove the 2010 on load, like this:你可以试试这个:
You can try this: