1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-02-28 08:43:23 -05:00

Couldn't edit in columns, assign date correctly

This commit is contained in:
Jason Denney 2013-11-03 08:40:37 -05:00
parent 25808eb27a
commit de338276c0

View File

@ -140,7 +140,7 @@ Ext.define('Ext.ux.form.field.DateTime', {
mixins:{ mixins:{
field:'Ext.form.field.Field' field:'Ext.form.field.Field'
}, },
alias: 'widget.xdateampmtime', alias: 'widget.xdatetime',
//configurables //configurables
@ -320,9 +320,15 @@ Ext.define('Ext.ux.form.field.DateTime', {
}, },
setValue: function(value){ setValue: function(value){
if (Ext.isString(value)){ console.log("setValue: " + value);
dt = new Date(value); if (Ext.isString(value) || Ext.isDate(value)){
value = Ext.Date.parse(value, this.getFormat()); //this.dateTimeFormat
if( Ext.isDate(value)){
dt = value;
}else{
dt = new Date(value);
value = Ext.Date.parse(value, this.getFormat()); //this.dateTimeFormat
}
this.dateField.setValue(value); this.dateField.setValue(value);
hour = Ext.Date.format(dt, 'g'); hour = Ext.Date.format(dt, 'g');