Browse Source

Pull request #3691: BI-138644 fix: 灰化的分秒可设置值

Merge in VISUAL/fineui from ~JIMMY.CHAI/fineui:master to master

* commit '0a6ae59c07811a98fbbcf7e96b753b6d74442a32':
  BI-138644 fix: 灰化的分秒可设置值
research/test
parent
commit
d8ff1a7574
  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