ExtJS DateFormat问题 [英] ExtJS DateFormat Issue

查看:282
本文介绍了ExtJS DateFormat问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有找到一个关于这个确切问题的现有问题(有几个类似但没有帮助)。



我有一个GridPanel的考试结果包括考试完成时。从SQL服务器返回的日期格式如 yyyy-mm-dd hh:mm:ss.uuu (2011-04-15 19:45:13.197)。



我的问题是即使时间是19:45,它总是显示为上午7:45。



dateformatter我是在列模型中,在数据存储中使用的是 Ymd H:i:s F j,Y,g​​:i A 。我已经在数据存储区尝试了几个不同的选项,如果他们甚至可以工作,他们都会有所作为。



谢谢

解决方案

您可以尝试以下操作:在商店中,使用键入:'date',dateFormat:'c'列使用 xtype:'datecolumn',格式为:'Ymd H:i:s'可以为我工作。


I haven't found an existing question on this exact problem (there were several that were similar but did not help).

I have a GridPanel with exam results, including when the exam was complete. The date returned from the SQL server is formatted like 'yyyy-mm-dd hh:mm:ss.uuu' (2011-04-15 19:45:13.197).

My problem is that even though the time is 19:45, it always displays as 7:45 AM.

The dateformatter I am using in the datastore is 'Y-m-d H:i:s' and 'F j, Y, g:i A' in the column model. I have tried several different options in the datastore and none of them make a difference, if they even work at all.

Thanks

解决方案

You can try the following: In the Store use type:'date', dateFormat: 'c' in the column use xtype: 'datecolumn', format: 'Y-m-d H:i:s' that work for me.

这篇关于ExtJS DateFormat问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆