Browse Source

Pull request #1756: 无JIRA任务 单独填写月份始终标红

Merge in VISUAL/fineui from ~WINDY/fui:master to master

* commit '3c9777c8c9e2bae05c92a11987c70c2861b94de4':
  无JIRA任务 补充
es6
windy 4 years ago
parent
commit
072a95c31d
  1. 3
      src/widget/yearmonth/trigger.yearmonth.js

3
src/widget/yearmonth/trigger.yearmonth.js

@ -69,8 +69,9 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
if (isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();
return v === "" || ((BI.isPositiveInteger(v) && v >= 1 && v <= 12) && !BI.checkDateVoid(self.yearEditor.getValue(), v, 1, o.min, o.max)[0]);
return v === "" || ((BI.isPositiveInteger(v) && v >= 1 && v <= 12) && (BI.isEmptyString(year) ? true : !BI.checkDateVoid(self.yearEditor.getValue(), v, 1, o.min, o.max)[0]));
},
quitChecker: function () {
return false;

Loading…
Cancel
Save