From bc556586167c8c1fed6d56d2b5a4bc7cc51adcb3 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 30 Jul 2020 18:41:04 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-36473=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BA=86=E6=97=A5=E6=9C=9F=E7=B1=BB=E5=9E=8B=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E5=85=88=E5=B1=95=E5=BC=80=E5=88=87=E6=8D=A2=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E6=9C=88=E4=BB=BD=E9=9D=A2=E6=9D=BF=EF=BC=8C=E5=86=8D=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=8C=BA=E9=97=B4=E4=BD=BF=E5=BE=97=E8=AF=A5=E6=9C=88?= =?UTF-8?q?=E4=BB=BD=E4=B8=8D=E5=90=88=E6=B3=95=EF=BC=8C=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E8=AF=A5=E6=9C=88=E4=BB=BD=E9=9D=A2=E6=9D=BF=E7=81=B0=E5=8C=96?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 1 + src/base/combination/navigation.js | 4 ++++ src/widget/date/calendar/picker.date.js | 2 +- src/widget/date/calendar/popup.calendar.date.js | 16 ++++++++-------- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/changelog.md b/changelog.md index 063ebead2..6f0170b55 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # 更新日志 2.0(2020-07) +- 修复了日期类型控件先展开切换日期月份面板,再设置区间使得该月份不合法,查看该月份面板灰化不对的问题 - bi.file文件上传控件accept属性与 [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept) 统一 - 修复了日期类型控件设置一个不在minDate和maxDate之间的日期值时,面板灰化与翻页按钮状态不对的问题 - BI.OB的on方法返回一个解除监听的函数 diff --git a/src/base/combination/navigation.js b/src/base/combination/navigation.js index 21a1f3ef5..4419e0f3a 100644 --- a/src/base/combination/navigation.js +++ b/src/base/combination/navigation.js @@ -124,6 +124,10 @@ BI.Navigation = BI.inherit(BI.Widget, { } }, + getAllCard: function() { + return BI.values(this.cardMap); + }, + /** * @override */ diff --git a/src/widget/date/calendar/picker.date.js b/src/widget/date/calendar/picker.date.js index dbb28bb72..9189e52bc 100644 --- a/src/widget/date/calendar/picker.date.js +++ b/src/widget/date/calendar/picker.date.js @@ -136,7 +136,7 @@ BI.DatePicker = BI.inherit(BI.Widget, { if (!BI.contains(allowMonth, month)) { month = allowMonth[0]; } - + this.month.setValue(month); return month; }, diff --git a/src/widget/date/calendar/popup.calendar.date.js b/src/widget/date/calendar/popup.calendar.date.js index 298fedd05..e76c4faec 100644 --- a/src/widget/date/calendar/popup.calendar.date.js +++ b/src/widget/date/calendar/popup.calendar.date.js @@ -103,17 +103,17 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, { }, _checkMin: function () { - var calendar = this.calendar.getSelectedCard(); - if (BI.isNotNull(calendar)) { - calendar.setMinDate(this.options.min); - } + var o = this.options; + BI.each(this.calendar.getAllCard(), function (idx, calendar) { + calendar.setMinDate(o.min); + }); }, _checkMax: function () { - var calendar = this.calendar.getSelectedCard(); - if (BI.isNotNull(calendar)) { - calendar.setMaxDate(this.options.max); - } + var o = this.options; + BI.each(this.calendar.getAllCard(), function (idx, calendar) { + calendar.setMaxDate(o.max); + }); }, setMinDate: function (minDate) {