This commit is contained in:
parent
b825fa2ed9
commit
2264e57920
|
@ -287,10 +287,16 @@ 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')
|
||||
if (type == 'start') {
|
||||
isdisabled =
|
||||
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) ||
|
||||
moment(str).isAfter(step1.end_time)
|
||||
moment(str).isAfter(step1.end_time)
|
||||
}
|
||||
}
|
||||
|
||||
if (type == 'end') {
|
||||
|
|
|
@ -816,9 +816,16 @@ 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')
|
||||
if (type == 'start') {
|
||||
isdisabled =
|
||||
moment(str).isBefore(beign_time) || moment(str).isAfter(end_time)
|
||||
if (isDay < '23:59:59') {
|
||||
isdisabled =
|
||||
moment(str).isBefore(beign_time) ||
|
||||
moment(str).subtract(1, 'days').isAfter(end_time)
|
||||
} else {
|
||||
isdisabled =
|
||||
moment(str).isBefore(beign_time) || moment(str).isAfter(end_time)
|
||||
}
|
||||
}
|
||||
|
||||
if (type == 'end') {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue