Browse Source

不合法值的处理

es6
windy 7 years ago
parent
commit
bb61a4241d
  1. 7
      bi/widget.js
  2. 7
      dist/bundle.js
  3. 16
      dist/bundle.min.js
  4. 7
      dist/widget.js
  5. 7
      src/widget/multidate/multidate.popup.js

7
bi/widget.js

@ -7364,6 +7364,11 @@ BI.MultiDatePopup = BI.inherit(BI.Widget, {
this.textButton.setEnable(false); this.textButton.setEnable(false);
} }
}, },
_checkValueValid: function (value) {
return BI.isNotNull(value) && BI.isNotEmptyObject(value) && BI.isNotEmptyString(value);
},
setValue: function (v) { setValue: function (v) {
this.storeValue = v; this.storeValue = v;
var self = this, date; var self = this, date;
@ -7419,7 +7424,7 @@ BI.MultiDatePopup = BI.inherit(BI.Widget, {
self._setInnerValue(this.day); self._setInnerValue(this.day);
break; break;
default: default:
if (BI.isNull(value) || BI.isEmptyObject(value)) { if (!this._checkValueValid(value)) {
var date = new Date(); var date = new Date();
this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD); this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD);
this.ymd.setValue({ this.ymd.setValue({

7
dist/bundle.js vendored

@ -82556,6 +82556,11 @@ BI.MultiDatePopup = BI.inherit(BI.Widget, {
this.textButton.setEnable(false); this.textButton.setEnable(false);
} }
}, },
_checkValueValid: function (value) {
return BI.isNotNull(value) && BI.isNotEmptyObject(value) && BI.isNotEmptyString(value);
},
setValue: function (v) { setValue: function (v) {
this.storeValue = v; this.storeValue = v;
var self = this, date; var self = this, date;
@ -82611,7 +82616,7 @@ BI.MultiDatePopup = BI.inherit(BI.Widget, {
self._setInnerValue(this.day); self._setInnerValue(this.day);
break; break;
default: default:
if (BI.isNull(value) || BI.isEmptyObject(value)) { if (!this._checkValueValid(value)) {
var date = new Date(); var date = new Date();
this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD); this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD);
this.ymd.setValue({ this.ymd.setValue({

16
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

7
dist/widget.js vendored

@ -7364,6 +7364,11 @@ BI.MultiDatePopup = BI.inherit(BI.Widget, {
this.textButton.setEnable(false); this.textButton.setEnable(false);
} }
}, },
_checkValueValid: function (value) {
return BI.isNotNull(value) && BI.isNotEmptyObject(value) && BI.isNotEmptyString(value);
},
setValue: function (v) { setValue: function (v) {
this.storeValue = v; this.storeValue = v;
var self = this, date; var self = this, date;
@ -7419,7 +7424,7 @@ BI.MultiDatePopup = BI.inherit(BI.Widget, {
self._setInnerValue(this.day); self._setInnerValue(this.day);
break; break;
default: default:
if (BI.isNull(value) || BI.isEmptyObject(value)) { if (!this._checkValueValid(value)) {
var date = new Date(); var date = new Date();
this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD); this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD);
this.ymd.setValue({ this.ymd.setValue({

7
src/widget/multidate/multidate.popup.js

@ -214,6 +214,11 @@ BI.MultiDatePopup = BI.inherit(BI.Widget, {
this.textButton.setEnable(false); this.textButton.setEnable(false);
} }
}, },
_checkValueValid: function (value) {
return BI.isNotNull(value) && BI.isNotEmptyObject(value) && BI.isNotEmptyString(value);
},
setValue: function (v) { setValue: function (v) {
this.storeValue = v; this.storeValue = v;
var self = this, date; var self = this, date;
@ -269,7 +274,7 @@ BI.MultiDatePopup = BI.inherit(BI.Widget, {
self._setInnerValue(this.day); self._setInnerValue(this.day);
break; break;
default: default:
if (BI.isNull(value) || BI.isEmptyObject(value)) { if (!this._checkValueValid(value)) {
var date = new Date(); var date = new Date();
this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD); this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD);
this.ymd.setValue({ this.ymd.setValue({

Loading…
Cancel
Save