Browse Source

Pull request #1422: REPORT-36473 fix: 修复了日期类型控件先展开切换日期月份面板,再设置区间使得该月份不合法,查看该月份面板灰化不对的问题

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

* commit 'bc556586167c8c1fed6d56d2b5a4bc7cc51adcb3':
  REPORT-36473 fix: 修复了日期类型控件先展开切换日期月份面板,再设置区间使得该月份不合法,查看该月份面板灰化不对的问题
es6
windy 4 years ago
parent
commit
4b54ef5ac0
  1. 1
      changelog.md
  2. 4
      src/base/combination/navigation.js
  3. 2
      src/widget/date/calendar/picker.date.js
  4. 16
      src/widget/date/calendar/popup.calendar.date.js

1
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方法返回一个解除监听的函数

4
src/base/combination/navigation.js

@ -124,6 +124,10 @@ BI.Navigation = BI.inherit(BI.Widget, {
}
},
getAllCard: function() {
return BI.values(this.cardMap);
},
/**
* @override
*/

2
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;
},

16
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) {

Loading…
Cancel
Save