admin管理员组文章数量:1297037
I have an HTML input element for my datepicker... pretty normal
<input type="text" id="from_date">
And a pretty normal setup for allowing the Month / Year changes
$('#from_date').datepicker({
dateFormat: "mm/yy",
changeMonth: true,
changeYear: true
});
But the Month dropdown shows names like "Jan" instead of "1" or "01"
How can I change the dropdown values to be the numerical representation?
I have an HTML input element for my datepicker... pretty normal
<input type="text" id="from_date">
And a pretty normal setup for allowing the Month / Year changes
$('#from_date').datepicker({
dateFormat: "mm/yy",
changeMonth: true,
changeYear: true
});
But the Month dropdown shows names like "Jan" instead of "1" or "01"
How can I change the dropdown values to be the numerical representation?
Share Improve this question asked Nov 29, 2012 at 17:17 adamadam 2,9708 gold badges56 silver badges89 bronze badges1 Answer
Reset to default 10Check datepicker options here: http://api.jqueryui./datepicker/
$('#from_date').datepicker({
dateFormat: "mm/yy",
changeMonth: true,
changeYear: true,
monthNames: ["1","2","3","4","5","6","7","8","9","10","11","12"],
monthNamesShort: ["1","2","3","4","5","6","7","8","9","10","11","12"]
});
This might be a solution.
本文标签: javascriptjquery DatePickernumeric month dropdownStack Overflow
版权声明:本文标题:javascript - jquery DatePicker - numeric month dropdown - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741639939a2389857.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论