[英]jQuery Date Picker with the TimePicker addon hours slider
I'm using Trent Richardson's timepicker add-on for JQ DatePicker. 我正在为JQ DatePicker使用Trent Richardson的timepicker插件。 http://trentrichardson.com/examples/timepicker/ http://trentrichardson.com/examples/timepicker/
Is there a way to have the hours slider display a 12 hour clock and AM or PM? 有没有办法让小时滑块显示12小时时钟和AM或PM?
This is the init I'm using: 这是我正在使用的初始化:
$('#date_xmas_eve_open').datetimepicker({
pickerTimeFormat: 'H:mm TT',
onClose: UpdateXmasEveOpen
});
Check out this resource (very useful for JS times\\dates and common formats): http://blog.stevenlevithan.com/archives/date-time-format 签出此资源(对JS时间\\日期和常用格式非常有用): http : //blog.stevenlevithan.com/archives/date-time-format
I believe the format you want is like this: 我相信您想要的格式是这样的:
$('#date_xmas_eve_open').datetimepicker({
pickerTimeFormat: 'h:MM TT',
onClose: UpdateXmasEveOpen
});
Hope this helps. 希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.