Open xiongjiabin opened 7 years ago
Below is how I fix this problem. Move the this.fetch to the palace after set min and max.
L.FormBuilder.Input = L.FormBuilder.Element.extend({
build: function () { this.input = L.DomUtil.create('input', this.options.className || '', this.parentNode); this.input.type = this.type(); this.input.name = this.name; this.input._helper = this; if (this.options.placeholder) { this.input.placeholder = this.options.placeholder; } if (this.options.min !== undefined) { this.input.min = this.options.min; } if (this.options.max !== undefined) { this.input.max = this.options.max; } if (this.options.step) { this.input.step = this.options.step; } **# this.fetch();** L.DomEvent.on(this.input, this.getSyncEvent(), this.sync, this); L.DomEvent.on(this.input, 'keydown', this.onKeyDown, this); },
Look like the default max vlaue is 100, if you set a value more than 100 before you set the max, the value will be 100. I tested in Chrome!
Below is how I fix this problem. Move the this.fetch to the palace after set min and max.
L.FormBuilder.Input = L.FormBuilder.Element.extend({