king
2024-04-29 50b49c1b760489c3430fc382656d57c5fbbab07c
src/tabviews/zshare/topSearch/mkDatePicker/index.jsx
@@ -54,10 +54,21 @@
    const { config } = this.props
    if (config.checkShift && nextProps.config.initval && nextProps.config.initval !== config.initval) {
      let val = nextProps.config.initval.split(',')
      let value = nextProps.config.initval || null
      if (this.state.mode === 'daterange') {
        if (value) {
          let val = value.split(',')
          value = [moment(val[0], this.state.format), moment(val[1], this.state.format)]
        } else {
          value = [null, null]
        }
      } else if (value) {
        value = moment(value, this.state.format)
      }
      this.setState({
        value: [moment(val[0], config.format), moment(val[1], config.format)]
        value: value
      })
      this.props.onChange(nextProps.config.initval, true)