Browse Source

Merge pull request #256845 in DEC/fineui from master to feature/x

* commit 'd8ff1a7574661d7ad757950853547925a8bfddb5':
  BI-138644 fix: 灰化的分秒可设置值
master
superman 12 months ago
parent
commit
47703eaca9
  1. 18
      packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js

18
packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js

@ -181,18 +181,24 @@ export class DynamicDateTimeSelect extends Widget {
}
_checkHour(value) {
this.hour.setDownEnable(parseInt(value) > 0);
this.hour.setUpEnable(parseInt(value) < 23);
const { timeSelectTypes } = this.options;
const canSelect = timeSelectTypes.includes(DynamicDateTimeSelect.HOUR);
this.hour.setDownEnable(canSelect && parseInt(value) > 0);
this.hour.setUpEnable(canSelect && parseInt(value) < 23);
}
_checkMinute(value) {
this.minute.setDownEnable(parseInt(value) > 0);
this.minute.setUpEnable(parseInt(value) < 59);
const { timeSelectTypes } = this.options;
const canSelect = timeSelectTypes.includes(DynamicDateTimeSelect.MINUTE);
this.minute.setDownEnable(canSelect && parseInt(value) > 0);
this.minute.setUpEnable(canSelect && parseInt(value) < 59);
}
_checkSecond(value) {
this.second.setDownEnable(parseInt(value) > 0);
this.second.setUpEnable(parseInt(value) < 59);
const { timeSelectTypes } = this.options;
const canSelect = timeSelectTypes.includes(DynamicDateTimeSelect.SECOND);
this.second.setDownEnable(canSelect && parseInt(value) > 0);
this.second.setUpEnable(canSelect && parseInt(value) < 59);
}
_autoSwitch(v, type) {

Loading…
Cancel
Save