diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js index 122157ea4..da7a12b3f 100644 --- a/public/react/src/modules/courses/new/Goldsubject.js +++ b/public/react/src/modules/courses/new/Goldsubject.js @@ -214,7 +214,7 @@ class Goldsubject extends Component { datatime: dateString, }); this.props.form.setFieldsValue({ - endtime: moment(dateString, dateFormat), + endtime: moment(dateString, dateFormat).add(1, 'days'), }); } @@ -237,7 +237,7 @@ class Goldsubject extends Component { datatimetwo: dateString, }) this.props.form.setFieldsValue({ - starttime: moment(dateString, dateFormat), + starttime: moment(dateString, dateFormat).add(1, 'days'), }); } diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 51d86b52e..27eedde90 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1316,21 +1316,21 @@ class Trainingjobsetting extends Component { if(this.state.allowreplenishment === true) { if(this.state.end_time=== undefined || this.state.end_time===""){ - - }else { this.setState({ end_time:moment(handleDateString(dateString)).add(1, 'months'), deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'), }) + }else { + } if(this.state.late_time===undefined || this.state.late_time===""){ - - }else{ this.setState({ late_time:moment(handleDateString(dateString)).add(2, 'months'), late_times:moment(handleDateString(dateString)).add(2, 'months').format('YYYY-MM-DD HH:mm'), }); + }else{ + } try { this.setState({ @@ -1343,12 +1343,12 @@ class Trainingjobsetting extends Component { } }else{ if(this.state.end_time=== undefined || this.state.end_time===""){ - - }else { this.setState({ end_time:moment(handleDateString(dateString)).add(1, 'months'), deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'), }) + }else { + } }