-
10 Dec 2011 3:01 PM #1
PR3 spinnerfield minValue bug
PR3 spinnerfield minValue bug
In 2.x PR3:
If I remove minValue and maxValue, it works. Otherwise I get "Uncaught TypeError: Property 'getMinValue' of object [object Object] is not a function"
Thanks.Code:{ xtype: 'spinnerfield', name: 'year', minValue: 1970, maxValue: 2020, incrementValue: 1, label: 'Year' }
-
11 Dec 2011 2:31 PM #2
confirm this.
a similar problem with numberfield
-
12 Dec 2011 12:09 AM #3
Thanks for the report.
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
18 Dec 2011 4:54 AM #4
I have a temporary fix, works in my app.
Code:Ext.field.Spinner.override({ applyValue: function(value) { value = parseFloat(value); if (isNaN(value)) { value = this.getDefaultValue(); } //round the value to 1 decimal value = Math.round(value * 10) / 10; var minValue = this.config.minValue, maxValue = this.config.maxValue; //from Ext.field.Number.applyValue if (Ext.isNumber(minValue)) { value = Math.max(value, minValue); } if (Ext.isNumber(maxValue)) { value = Math.min(value, maxValue); } return parseFloat(value); } });
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-1225
in
2.0.



Reply With Quote