diff --git a/src/components/knockGold/index.jsx b/src/components/knockGold/index.jsx index 41c12667..4abc9e24 100644 --- a/src/components/knockGold/index.jsx +++ b/src/components/knockGold/index.jsx @@ -287,14 +287,15 @@ export default class addKnockGold extends Component { let step1 = JSON.parse(sessionStorage.getItem('knockGold_effectDate')) let isdisabled = false let str = moment(date).format('YYYY-MM-DD HH:mm:ss') - const isDay = moment(step1.begin_time).format('HH:mm:ss') + const isDay = moment(step1.end_time).format('HH:mm:ss') if (type == 'start') { if (isDay < '23:59:59') { isdisabled = moment(str).isBefore(step1.begin_time) || moment(str).subtract(1, 'days').isAfter(step1.end_time) } else { - moment(str).isBefore(step1.begin_time) || + isdisabled = + moment(str).isBefore(step1.begin_time) || moment(str).isAfter(step1.end_time) } } diff --git a/src/pages/exchangecode/copyCode/index.jsx b/src/pages/exchangecode/copyCode/index.jsx index af84b35d..e9dac74b 100644 --- a/src/pages/exchangecode/copyCode/index.jsx +++ b/src/pages/exchangecode/copyCode/index.jsx @@ -816,7 +816,7 @@ export default class acclist extends React.Component { let str = moment(date).format('YYYY-MM-DD HH:mm:ss') let beign_time = this.state.begintime let end_time = this.state.endtime - const isDay = moment(beign_time).format('HH:mm:ss') + const isDay = moment(end_time).format('HH:mm:ss') if (type == 'start') { if (isDay < '23:59:59') { isdisabled = diff --git a/src/pages/plan/add/step2.js b/src/pages/plan/add/step2.js index 60c66fa9..2e67d99e 100644 --- a/src/pages/plan/add/step2.js +++ b/src/pages/plan/add/step2.js @@ -542,7 +542,7 @@ export default class acclist extends React.Component { let step1 = JSON.parse(sessionStorage.getItem('knockGold_effectDate')) let isdisabled = false let str = moment(date).format('YYYY-MM-DD HH:mm:ss') - let isDay = moment(step1.begin_time).format('HH:mm:ss') + let isDay = moment(step1.end_time).format('HH:mm:ss') if (type == 'start') { if (isDay < '23:59:59') { isdisabled =