diff --git a/dist/bundle.js b/dist/bundle.js index d61a05bd5..e1c816876 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -111131,11 +111131,13 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year // 判格式合法 _check: function (smallDate, bigDate) { var smallObj = smallDate.match(/\d+/g), bigObj = bigDate.match(/\d+/g); - return this._dateCheck(smallDate) && BI.checkDateLegal(smallDate) && this._checkVoid({ + var smallDate4Check = (smallObj[0] || "") + "-" + (smallObj[1] || 1); + var bigDate4Check = (bigObj[0] || "") + "-" + (bigObj[1] || 1); + return this._dateCheck(smallDate4Check) && BI.checkDateLegal(smallDate) && this._checkVoid({ year: smallObj[0], month: smallObj[1], day: 1 - }) && this._dateCheck(bigDate) && BI.checkDateLegal(bigDate) && this._checkVoid({ + }) && this._dateCheck(bigDate4Check) && BI.checkDateLegal(bigDate) && this._checkVoid({ year: bigObj[0], month: bigObj[1], day: 1 @@ -111166,7 +111168,8 @@ BI.YearMonthInterval.EVENT_VALID = "EVENT_VALID"; BI.YearMonthInterval.EVENT_ERROR = "EVENT_ERROR"; BI.YearMonthInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; -BI.shortcut("bi.year_month_interval", BI.YearMonthInterval);/** +BI.shortcut("bi.year_month_interval", BI.YearMonthInterval); +/** * 年份展示面板 * * Created by GUY on 2015/9/2. diff --git a/dist/fineui.js b/dist/fineui.js index 7164ee76b..4ab3d385c 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -111380,11 +111380,13 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year // 判格式合法 _check: function (smallDate, bigDate) { var smallObj = smallDate.match(/\d+/g), bigObj = bigDate.match(/\d+/g); - return this._dateCheck(smallDate) && BI.checkDateLegal(smallDate) && this._checkVoid({ + var smallDate4Check = (smallObj[0] || "") + "-" + (smallObj[1] || 1); + var bigDate4Check = (bigObj[0] || "") + "-" + (bigObj[1] || 1); + return this._dateCheck(smallDate4Check) && BI.checkDateLegal(smallDate) && this._checkVoid({ year: smallObj[0], month: smallObj[1], day: 1 - }) && this._dateCheck(bigDate) && BI.checkDateLegal(bigDate) && this._checkVoid({ + }) && this._dateCheck(bigDate4Check) && BI.checkDateLegal(bigDate) && this._checkVoid({ year: bigObj[0], month: bigObj[1], day: 1 @@ -111415,7 +111417,8 @@ BI.YearMonthInterval.EVENT_VALID = "EVENT_VALID"; BI.YearMonthInterval.EVENT_ERROR = "EVENT_ERROR"; BI.YearMonthInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; -BI.shortcut("bi.year_month_interval", BI.YearMonthInterval);/** +BI.shortcut("bi.year_month_interval", BI.YearMonthInterval); +/** * 年份展示面板 * * Created by GUY on 2015/9/2. diff --git a/dist/widget.js b/dist/widget.js index 0b1e55667..887240cbd 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -23444,11 +23444,13 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year // 判格式合法 _check: function (smallDate, bigDate) { var smallObj = smallDate.match(/\d+/g), bigObj = bigDate.match(/\d+/g); - return this._dateCheck(smallDate) && BI.checkDateLegal(smallDate) && this._checkVoid({ + var smallDate4Check = (smallObj[0] || "") + "-" + (smallObj[1] || 1); + var bigDate4Check = (bigObj[0] || "") + "-" + (bigObj[1] || 1); + return this._dateCheck(smallDate4Check) && BI.checkDateLegal(smallDate) && this._checkVoid({ year: smallObj[0], month: smallObj[1], day: 1 - }) && this._dateCheck(bigDate) && BI.checkDateLegal(bigDate) && this._checkVoid({ + }) && this._dateCheck(bigDate4Check) && BI.checkDateLegal(bigDate) && this._checkVoid({ year: bigObj[0], month: bigObj[1], day: 1 @@ -23479,7 +23481,8 @@ BI.YearMonthInterval.EVENT_VALID = "EVENT_VALID"; BI.YearMonthInterval.EVENT_ERROR = "EVENT_ERROR"; BI.YearMonthInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; -BI.shortcut("bi.year_month_interval", BI.YearMonthInterval);/** +BI.shortcut("bi.year_month_interval", BI.YearMonthInterval); +/** * 年份展示面板 * * Created by GUY on 2015/9/2. diff --git a/src/widget/yearmonthinterval/yearmonthinterval.js b/src/widget/yearmonthinterval/yearmonthinterval.js index 8610c94fd..d7e0e8d59 100644 --- a/src/widget/yearmonthinterval/yearmonthinterval.js +++ b/src/widget/yearmonthinterval/yearmonthinterval.js @@ -147,11 +147,13 @@ BI.YearMonthInterval = BI.inherit(BI.Single, { // 判格式合法 _check: function (smallDate, bigDate) { var smallObj = smallDate.match(/\d+/g), bigObj = bigDate.match(/\d+/g); - return this._dateCheck(smallDate) && BI.checkDateLegal(smallDate) && this._checkVoid({ + var smallDate4Check = (smallObj[0] || "") + "-" + (smallObj[1] || 1); + var bigDate4Check = (bigObj[0] || "") + "-" + (bigObj[1] || 1); + return this._dateCheck(smallDate4Check) && BI.checkDateLegal(smallDate) && this._checkVoid({ year: smallObj[0], month: smallObj[1], day: 1 - }) && this._dateCheck(bigDate) && BI.checkDateLegal(bigDate) && this._checkVoid({ + }) && this._dateCheck(bigDate4Check) && BI.checkDateLegal(bigDate) && this._checkVoid({ year: bigObj[0], month: bigObj[1], day: 1 @@ -182,4 +184,4 @@ BI.YearMonthInterval.EVENT_VALID = "EVENT_VALID"; BI.YearMonthInterval.EVENT_ERROR = "EVENT_ERROR"; BI.YearMonthInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; -BI.shortcut("bi.year_month_interval", BI.YearMonthInterval); \ No newline at end of file +BI.shortcut("bi.year_month_interval", BI.YearMonthInterval);