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