|
@@ -5,7 +5,7 @@ Ext.define('saas.view.core.form.field.Month', {
|
|
|
extend:'Ext.form.field.Picker',
|
|
extend:'Ext.form.field.Picker',
|
|
|
alias: 'widget.monthdatefield',
|
|
alias: 'widget.monthdatefield',
|
|
|
requires: ['Ext.picker.Month'],
|
|
requires: ['Ext.picker.Month'],
|
|
|
- format : "m/Y",
|
|
|
|
|
|
|
+ format : "Y-m",
|
|
|
disabledDaysText : "Disabled",
|
|
disabledDaysText : "Disabled",
|
|
|
disabledDatesText : "Disabled",
|
|
disabledDatesText : "Disabled",
|
|
|
triggerCls : Ext.baseCSSPrefix + 'form-date-trigger',
|
|
triggerCls : Ext.baseCSSPrefix + 'form-date-trigger',
|
|
@@ -84,12 +84,12 @@ Ext.define('saas.view.core.form.field.Month', {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- this.setValue(year + '' + month);
|
|
|
|
|
|
|
+ this.setValue(year + '-' + month);
|
|
|
}
|
|
}
|
|
|
me.onSelect();
|
|
me.onSelect();
|
|
|
},
|
|
},
|
|
|
getCurrentVal:function(){
|
|
getCurrentVal:function(){
|
|
|
- return Ext.Date.format(new Date(),'Ym');
|
|
|
|
|
|
|
+ return Ext.Date.format(new Date(), this.format);
|
|
|
},
|
|
},
|
|
|
onCancelClick: function() {
|
|
onCancelClick: function() {
|
|
|
this.onSelect();
|
|
this.onSelect();
|
|
@@ -108,9 +108,10 @@ Ext.define('saas.view.core.form.field.Month', {
|
|
|
},
|
|
},
|
|
|
setValue : function(value) {
|
|
setValue : function(value) {
|
|
|
if (Ext.isEmpty(value)) {
|
|
if (Ext.isEmpty(value)) {
|
|
|
- value =me.getCurrentVal();
|
|
|
|
|
|
|
+ value =this.getCurrentVal();
|
|
|
}
|
|
}
|
|
|
- this.callParent(arguments);
|
|
|
|
|
|
|
+ value = Ext.Date.format(new Date(value), this.format);
|
|
|
|
|
+ this.callParent([value]);
|
|
|
},
|
|
},
|
|
|
onSelect: function() {
|
|
onSelect: function() {
|
|
|
this.monthPicker.hide();
|
|
this.monthPicker.hide();
|