如何使jquery datepicker默认日期为mm-yyyy(字面意思)
我正在使用 jquery 日期选择器。 ChangeYear 和changeMonth 选项设置为true。如果您单击日期输入,此链接正是我的日期选择器的外观盒子。看看他们如何选择月份和年份?
在我的测试组中,大约 20% 的用户忘记选择年份(这是他们的出生日期……我知道这很愚蠢)。我正在尝试找到一种方法将月份和年份下拉设置为“mm”和“yyyy”,以提示用户选择两者。但是,defaultDate 选项似乎不接受这种输入,它只是默认为当前日期。
我被困住了。有人愿意给我一些智慧吗?
编辑
我想我没有说清楚。我希望“mm”“yyyy”(字母)默认显示在下拉列表中。
I'm using the jquery datepicker. The changeYear and changeMonth options are set to true. This link is exactly how my date picker looks if you click on the date input box. See how they have to select month and year?
In my testing group about 20% of the users are forgetting to select the year (it's their birth date...dumb I know). I'm trying to find a way to set the month and year drop down to 'mm' and 'yyyy' as to prompt the user to select both. However, it seems the defaultDate option won't accept that kind of input and it just defaults to the current date.
I'm stuck. Anyone care to drop some wisdom on me?
EDIT
I guess I didn't make it clear. I want "mm" "yyyy" (the letters) to display in the drop downs as default.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编辑:原帖已删除。抱歉,误读了您的问题..
我不相信您可以通过插件选项实现您想要做的事情..
Edit: Original post deleted. Sorry, misread your Question..
I do not believe what you are trying to do is available through the plugin options..