Merge branches 'dev_aliyun' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

chromesetting
杨树明 5 years ago
commit 98f457f458

@ -525,7 +525,7 @@ class Exercisesetting extends Component{
end_time:null end_time:null
}) })
}else{ }else{
if(moment(date,"YYYY-MM-DD HH:mm") <= moment()){ if(dateString<moment().format('YYYY-MM-DD HH:mm')){
this.setState({ this.setState({
unit_e_tip:"截止时间不能早于当前时间", unit_e_tip:"截止时间不能早于当前时间",
e_flag:true e_flag:true

@ -33,6 +33,11 @@ function disabledDateTime() {
// disabledSeconds: () => [55, 56], // disabledSeconds: () => [55, 56],
}; };
} }
function disabledDate(current) {
return current && current < moment().endOf('day').subtract(1, 'days');
}
const dataformat="YYYY-MM-DD HH:mm"; const dataformat="YYYY-MM-DD HH:mm";
class PollDetailTabForth extends Component{ class PollDetailTabForth extends Component{
@ -597,6 +602,7 @@ class PollDetailTabForth extends Component{
width={"240px"} width={"240px"}
format="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm"
disabledTime={disabledDateTime} disabledTime={disabledDateTime}
disabledDate={disabledDate}
onChange={this.onChangeTimeEnd} onChange={this.onChangeTimeEnd}
value={ end_time && moment(end_time,dataformat) } value={ end_time && moment(end_time,dataformat) }
disabled={un_change_end == true ? this.props.isAdmin()?!flagPageEdit:true : !flagPageEdit } disabled={un_change_end == true ? this.props.isAdmin()?!flagPageEdit:true : !flagPageEdit }

@ -447,7 +447,7 @@ class PollDetailTabForthRules extends Component{
</p> </p>
</div> </div>
<div className="fl mr20 yskspickersy"> <div className="fl mr20 yskspickersy">
<Tooltip placement="bottom" title={rule.e_timeflag ? this.props.isAdmin()?"截止时间已过,不能再修改":"":""}> <Tooltip placement="bottom" title={rule.e_timeflag ? this.props.isAdmin()?"":"截止时间已过,不能再修改":""}>
<span> <span>
<DatePicker <DatePicker
showToday={false} showToday={false}

Loading…
Cancel
Save