|
Title: number-spinner cannot set default Post by: devnull on October 16, 2012, 02:36:49 AM I cannot get the default value of 1 to appear:
This won't work Code: <input name="test_1" class="easyui-numberspinner" data-options="min:0,max:3,editable:false" value="1"> Neither will this: Code: <input name="test_1" class="easyui-numberspinner" data-options="value:1,min:0,max:3,editable:false"> Title: Re: number-spinner cannot set default Post by: stworthy on October 16, 2012, 03:23:18 AM They all work fine. Please refer to this sample.
http://jsfiddle.net/asSv7/ Title: Re: number-spinner cannot set default Post by: devnull on October 16, 2012, 04:19:46 AM My apologies, there seems to be some other code which is interfering with it, I am still investigating what that is.
Thanks Title: Re: number-spinner cannot set default Post by: devnull on October 16, 2012, 04:44:53 AM OK, I discovered the problem, because the default is set as the input "value" attribute, when you clear the form form('clear') the value also gets cleared and so the field is then null.
I also noticed that this happens with other fields such as the combobox. Can this be changed so that when a form is cleared, the combo box, number spinner etc default to their default values and not null ? - or add anew method reset() which sets all controls on the form to their default state / values ?? Thanks |