Date formatting is broken (4.1.1)
Ext version tested:
Browser versions tested against:
Description:
ExtJS's date formatter appears to be broken: 'time', 'timestamp', and 'u' all return invalid values. ('time' and 'timestamp' produce an - incomprehensible - alphanumeric string, and 'u' seems to produce "000" reliably.
Steps to reproduce the problem:- Get a submit value from a datefield with submitFormat specified. (datefield.getSubmitValue())
The result that was expected:
A valid time, timestamp, or millisecond representation of the date.
The result that occurs instead:
An invalid time, timestamp, or millisecond representation of the date.
Test Case:
Code:
Ext.onReady(function(){
timeStampDateField = Ext.create('Ext.form.field.Date',{
fieldLabel:'\"timestamp\" formatter is broken',
labelAlign:'right',
renderTo:Ext.getBody(),
labelWidth:150,
margin:'0 0 10 0',
submitFormat:'timestamp',
listeners:{
change:function(me){
alert("timestamp: "+me.getSubmitValue())
}
},
minValue:new Date()
});
timeDateField = Ext.create('Ext.form.field.Date',{
fieldLabel:'and so is \"time\"',
labelAlign:'right',
renderTo:Ext.getBody(),
labelWidth:150,
margin:'0 0 10 0',
submitFormat:'time',
listeners:{
change:function(me){
alert("time: "+me.getSubmitValue())
}
},
minValue:new Date()
});
timeDateField = Ext.create('Ext.form.field.Date',{
fieldLabel:'and \"u\"',
labelAlign:'right',
renderTo:Ext.getBody(),
labelWidth:150,
margin:'0 0 10 0',
submitFormat:'u',
listeners:{
change:function(me){
alert("u: "+me.getSubmitValue())
}
},
minValue:new Date()
});
});