原生质体日期选择器:具有不同日期时间格式的问题 [英] Protoplasm Date Picker : Issue with different datetime format
问题描述
现在,我们面临特定日期时间格式的问题,插件显示错误的时间。这是html
< html>
< head>
< script language =javascriptsrc =protoplasm.js>< / script>
< script language =javascript>
// transform()调用可以链接在一起
Protoplasm.use('datepicker')
.transform('input.datepicker',{timePicker:true,use24hrs:false,dateTimeFormat: 'dd-MM-yyyy HH:mm a'})
.transform('input.datetimepicker')
;
< / script>
< / head>
< body>
< input type =textname =dateclass =datepicker/>
< / body>
< / html>
当用户点击插件上的PM框显示16-04-2012 22: 59 PM 而不是16-04-2012 10:59 PM 。但是如果他点击AM框就可以使用。
有没有人遇到过这样的问题?
请帮我解决这个问题。
感谢Amit Patel
HH
with hh
in dateTimeFormat
p>
I am working an application having I18N support. In this application, based on user's locale user is prompted enters date time in locale specific format along with other details in a form. We have used protoplasm date time picker to select date time.
Right now we are facing an issue with specific datetime format where the plugin shows wrong hours. Here is the html
<html>
<head>
<script language="javascript" src="protoplasm.js"></script>
<script language="javascript">
// transform() calls can be chained together
Protoplasm.use('datepicker')
.transform('input.datepicker', {timePicker:true, use24hrs:false, dateTimeFormat: 'dd-MM-yyyy HH:mm a'} )
.transform('input.datetimepicker')
;
</script>
</head>
<body>
<input type="text" name="date" class="datepicker" />
</body>
</html>
When user click on PM box on the plugin it shows 16-04-2012 22:59 PM instead of 16-04-2012 10:59 PM. However if he click on AM box it works.
Has anyone faced such issues?
Please help me to resolve this problem.
Thanks, Amit Patel
I replaced HH
with hh
in dateTimeFormat
and it worked.
这篇关于原生质体日期选择器:具有不同日期时间格式的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!