diff --git a/src/widget/singleslider/singleslider.js b/src/widget/singleslider/singleslider.js index df1c958d6..12aba0196 100644 --- a/src/widget/singleslider/singleslider.js +++ b/src/widget/singleslider/singleslider.js @@ -16,8 +16,7 @@ BI.SingleSlider = BI.inherit(BI.Single, { props: { baseCls: "bi-single-slider bi-slider-track", digit: false, - unit: "", - errorText: "" + unit: "" }, render: function () { @@ -323,11 +322,12 @@ BI.SingleSlider = BI.inherit(BI.Single, { if (!isNaN(this.min) && !isNaN(this.max)) { this._setVisible(true); this.enable = true; - if (BI.isNotEmptyString(o.errorText)) { - this.label.setErrorText(o.errorText); - } else { + if (o.digit) { this.label.setErrorText(BI.i18nText("BI-Basic_Please_Enter_Number_Between", this.min, this.max)); + } else { + this.label.setErrorText(BI.i18nText("BI-Basic_Please_Enter_Integer_Number_Between", this.min, this.max)); } + if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { this.label.setValue(this.value); this._setAllPosition(this._getPercentByValue(this.value));