修复bug
This commit is contained in:
parent
b487a569cf
commit
b825fa2ed9
|
@ -305,11 +305,19 @@ 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]))
|
const isDay = moment(this.state.model.entry_time[1]).format('HH:mm:ss')
|
||||||
if (type == 'start') {
|
if (type == 'start') {
|
||||||
|
if (isDay < '23:59:59') {
|
||||||
isdisabled =
|
isdisabled =
|
||||||
moment(str).isBefore(this.state.model.entry_time[0]) ||
|
moment(str).isBefore(this.state.model.entry_time[0]) ||
|
||||||
moment(str).subtract(1, 'days').isAfter(this.state.model.entry_time[1])
|
moment(str)
|
||||||
|
.subtract(1, 'days')
|
||||||
|
.isAfter(this.state.model.entry_time[1])
|
||||||
|
} else {
|
||||||
|
isdisabled =
|
||||||
|
moment(str).isBefore(this.state.model.entry_time[0]) ||
|
||||||
|
moment(str).isAfter(this.state.model.entry_time[1])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == 'end') {
|
if (type == 'end') {
|
||||||
|
|
Loading…
Reference in New Issue