option to change jquery ui datepicker to just a “yearpicker”

别等时光非礼了梦想. 提交于 2019-12-12 01:29:26

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/5093948/option-to-change-jquery-ui-datepicker-to-just-a-yearpicker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!