我使用 extjs 创建了一个简单的应用程序timefield
。这是代码和小提琴:
Ext.create('Ext.form.Panel', {
title: 'Time Card',
width: 300,
bodyPadding: 10,
renderTo: Ext.getBody(),
items: [{
xtype: 'timefield',
id: 'in',
fieldLabel: 'Time In',
//minValue: '6:00 AM',
//maxValue: '8:00 PM',
format: 'H:i',
increment: 30,
anchor: '100%'
}, {
xtype: 'button',
text: 'click',
handler: function(){
alert(Ext.getCmp('in').getValue());
console.log(Ext.getCmp('in').getValue());
}
}]
});
问题/问题:
- 当我使用 getValue() 它返回
Tue Jan 01 2008 01:00:00 GMT-0500 (Eastern Standard Time)
. 我不确定为什么它会返回 2008 年? - 有没有办法捕获时区信息?