选项将jquery ui datepicker更改为"yearpicker" [英] option to change jquery ui datepicker to just a "yearpicker"
问题描述
我正在检查数据选择器文档,试图找到一种方法来更改它一个完整的显示日期选择器,仅可以选择一年.但是我什么也找不到.我尝试过在此处找到的建议,但仍然显示完整视图.
I'm checking datapicker documentation here trying to find a way to change it from a full display date picker to just something where I can pick a year only. But I can't find anything. I tried suggestions found here like this, but it still displays the full view.
.datepicker({changeDay:false, changeMonth:false, changeYear:true})
我可以将数据选择器仅转换为一年选择器吗?
Can I somehow turn the datapicker to a year picker only?
推荐答案
对于我公司的网站,我们使用jQuery UI滑块,因为year是单个值.在我们的实施中,我们还必须进行一年的范围调整,为此还需要一个滑块.
For my company's website, we used jQuery UI slider instead since year is a single value. In our implementation, we also had to do a year range, a slider also accommodated for that.
http://jqueryui.com/demos/slider/#steps
这篇关于选项将jquery ui datepicker更改为"yearpicker"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!