ExtJS DateFormat问题 [英] ExtJS DateFormat Issue
问题描述
我有一个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屋!