Commit e5ea39d50c786631d75d30ce9e275c45b276cd05
1 parent
79a60955
Exists in
master
and in
65 other branches
ms ok
Showing
1 changed file
with
9 additions
and
5 deletions
Show diff stats
js/app/models/AmdaTimeObject.js
... | ... | @@ -43,7 +43,9 @@ Ext.define('amdaModel.AmdaTimeObject', { |
43 | 43 | defaultValue:Ext.Date.add(Ext.Date.clearTime(new Date()),Ext.Date.DAY,-1), |
44 | 44 | convert: function(value,rec) { |
45 | 45 | if (!Ext.isDate(value)) { |
46 | - return new Date(value); | |
46 | + var valueString = new String(value).replaceAll('\/','\-'); | |
47 | + var date = new Date(valueString); | |
48 | + return date; | |
47 | 49 | } |
48 | 50 | return value; |
49 | 51 | } |
... | ... | @@ -52,12 +54,14 @@ Ext.define('amdaModel.AmdaTimeObject', { |
52 | 54 | name: 'stopDate', |
53 | 55 | type: 'date', |
54 | 56 | defaultValue: Ext.Date.clearTime (new Date()), persist: false, |
55 | - convert: function(value,rec) { | |
56 | - if (!Ext.isDate(value)){ | |
57 | - return new Date(value); | |
57 | + convert: function(value,rec) { | |
58 | + if (!Ext.isDate(value)) { | |
59 | + var valueString = new String(value).replaceAll('\/','\-'); | |
60 | + var date = new Date(valueString); | |
61 | + return date; | |
58 | 62 | } |
59 | 63 | return value; |
60 | - } | |
64 | + } | |
61 | 65 | }, |
62 | 66 | { |
63 | 67 | name: 'durationDay', type: 'int', |
... | ... |