调整时间

chromesetting
杨树明 5 years ago
parent d0dee3c3fe
commit dc01f2630b

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

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

@ -447,7 +447,7 @@ class PollDetailTabForthRules extends Component{
</p>
</div>
<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>
<DatePicker
showToday={false}

Loading…
Cancel
Save