This commit is contained in:
parent
931fa8de57
commit
d1914b0092
|
@ -126,13 +126,9 @@ export default class acclist extends React.Component{
|
|||
model:model2
|
||||
});
|
||||
}
|
||||
onDisabledCombinedDate = (val)=>{
|
||||
|
||||
console.log(val.getTime())
|
||||
console.log(new Date().getTime())
|
||||
|
||||
|
||||
return val.getDate() < new Date();
|
||||
onDisabledCombinedDate = (val)=>{
|
||||
|
||||
return val.getTime() < new Date().getTime();
|
||||
}
|
||||
render(){
|
||||
//校验规则
|
||||
|
|
|
@ -12,6 +12,7 @@ import Addruleform from "./addruleform/addruleform"
|
|||
import Productform from "../product/add"
|
||||
import Bus from "../../../assets/eventBus.js"
|
||||
import _ from "lodash";
|
||||
import moment from "moment"
|
||||
const TabPanel = Tabs.TabPanel;
|
||||
|
||||
export default class acclist extends React.Component{
|
||||
|
@ -258,6 +259,22 @@ export default class acclist extends React.Component{
|
|||
this.setState({distdata:this.state.distdata})
|
||||
console.log(this.state.distdata)
|
||||
}
|
||||
|
||||
onDisabledCombinedDate = (val)=>{
|
||||
|
||||
let step1 = JSON.parse (sessionStorage.getItem("step1"));
|
||||
let str = moment(val).format("YYYY-MM-DD HH:mm:ss")
|
||||
|
||||
|
||||
|
||||
let isBetween = moment(str).isBetween(step1.begin_time,step1.end_time);
|
||||
console.log(isBetween)
|
||||
|
||||
return isBetween
|
||||
}
|
||||
|
||||
|
||||
|
||||
render(){
|
||||
const Column = [
|
||||
{
|
||||
|
@ -591,6 +608,7 @@ export default class acclist extends React.Component{
|
|||
format: 'HH:mm:ss',
|
||||
defaultTime: ['12:00:00', '23:59:59'],
|
||||
}}
|
||||
disabledDate={this.onDisabledCombinedDate}
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
onChange={(e)=>{
|
||||
|
||||
|
|
|
@ -54,6 +54,11 @@ export default class acclist extends React.Component{
|
|||
// model2.style = e;
|
||||
// this.setState({model:model2})
|
||||
}
|
||||
|
||||
onDisabledCombinedDate = (val)=>{
|
||||
|
||||
return val.getTime() < new Date().getTime();
|
||||
}
|
||||
render(){
|
||||
const Column = [
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue