Uncaught TypeError: Cannot set property 'TimeStrategy' of undefined
Error How do i fix code ?
New spinner. Defaults to a number spinner
var s = new Ext.ux.form.Spinner(); s.applyTo('t');
New spinner. Initial value 10; Set it to a number spinner with min- and max value
var s = new Ext.ux.form.Spinner({ value: 10, strategy: new Ext.ux.form.Spinner.NumberStrategy({minValue:0, maxValue:20}) }); s.applyTo('t');
New spinner. Set spinner to a date spinner
var s = new Ext.ux.form.Spinner({ strategy: new Ext.ux.form.Spinner.DateStrategy() }); s.applyTo('t');
Create your own spin strategies, by extending the Ext.ux.form.Spinner.Strategy class
For example a time spinner:
Ext.ux.form.Spinner.TimeStrategy = function(config){ Ext.ux.form.Spinner.TimeStrategy.superclass.constructor.call(this, config); }; Ext.extend(Ext.ux.form.Spinner.TimeStrategy, Ext.ux.form.Spinner.DateStrategy, { format : "H:i", incrementValue : 1, incrementConstant : Date.MINUTE, alternateIncrementValue : 1, alternateIncrementConstant : Date.HOUR /* spin : function(field, down, alternate){ Ext.ux.form.Spinner.TimeStrategy.superclass.spin.call(this); //extend this class. (no need to extend for time strategy) } */ });
출저 : http://members.upc.nl/j.chim/ext/spinner/ext-spinner.html
참고 : https://www.sencha.com/forum/showthread.php?16352-2.0-Ext.ux.form.Spinner&highlight=spinner
'web lang > ExtJS' 카테고리의 다른 글
extjs ie word / white-space / 자동 줄바꿈 (0) | 2016.02.29 |
---|---|
[ExtJs] eclipse very slow / extjs 가 너무 무거워서 느릴 때 (0) | 2016.02.29 |
ExtJs Layout (0) | 2016.02.17 |
[ExtJs] Cell Edit / 그리드에서 바로 CRUD (0) | 2016.02.17 |
[ExtJs] table layout full width / 테이블 레이아웃 100% 넓이 (0) | 2016.02.17 |