解决立减金固定时间不能选择

This commit is contained in:
wangsongsole 2022-08-19 14:46:00 +08:00
parent 93bfb654ab
commit b487a569cf
1 changed files with 2 additions and 1 deletions

View File

@ -305,10 +305,11 @@ export default class addKnockGold extends Component {
onDisabledRange2 = (date, type) => { onDisabledRange2 = (date, type) => {
let isdisabled = false let isdisabled = false
let str = moment(date).format('YYYY-MM-DD HH:mm:ss') let str = moment(date).format('YYYY-MM-DD HH:mm:ss')
console.log(str, moment(str).isAfter(this.state.model.entry_time[1]))
if (type == 'start') { if (type == 'start') {
isdisabled = isdisabled =
moment(str).isBefore(this.state.model.entry_time[0]) || moment(str).isBefore(this.state.model.entry_time[0]) ||
moment(str).isAfter(this.state.model.entry_time[1]) moment(str).subtract(1, 'days').isAfter(this.state.model.entry_time[1])
} }
if (type == 'end') { if (type == 'end') {