title: how to set new value in datePicker from ant-design?
body: <p>I want to set that the whole day is selected to block the site during work, but when it is pressed / selected day then the starOf ('day') method does not change the time to 00:00</p>
  
  <pre class="lang-js prettyprint-override"><code>class SomeClass extends Component {
   state = {
      valueCollections: {},
      showAndHideShowTime: true,
    };
  setItem = (props) =&gt; {
      const {
        item,
        isCreate,
        type,
      } = props;
      const value = item;
      if (value) {
        const valueCollections = {
          category: value.Category,
          // alternatively, it shall cease to exist if there is a change of opinion
          // validFrom: moment(value.ValidFrom),
          // validTo: value.ValidTo !== undefined &amp;&amp; value.ValidTo !== null
          //   ? moment(value.ValidTo)
          //   : null,
          validFrom: type.includes('view') ? moment(value.ValidFrom) : moment(new Date(), dateFormat),
          validTo: type.includes('view') ? moment(value.ValidTo) : moment(new Date(), dateFormat)
        };
        const currentCategory = this.props.modalOptions.valuesForEdit.categories.filter(el =&gt;
          el.Value === valueCollections.category)[0];
        let newValArray =
        this.props.modalOptions.valuesForEdit.descriptions.filter(el =&gt;
          currentCategory.Id === el.CategoryId);
        if (newValArray.length &gt; 1) {
          newValArray = newValArray.filter(el =&gt;
            el.DirectionId === valueCollections.direction);
        } else {
          this.setState({
            valueCollections,
          });
        }
      } else if (isCreate) {
        const valueCollections = {
          category: 1,
          validFrom: moment(new Date(), dateFormat),
          validFromStartDay: moment().startOf('date'),
          validTo: moment(new Date(), dateFormat),
          validToEndDay: moment().startOf('date')
        };
        this.setState({
          valueCollections,
        });
      }
    }
  render() {
  
  const { valueCollections } = this.state;
  
  
  const dataPickerWithChangesFormatStart = (
  &lt;DatePicker
        showTime={this.state.showAndHideShowTime}
        format={correctDateFormat}
  /&gt;
  );
  
   const startOfDayPick = (
        this.state.showAndHideShowTime === true
          ? valueCollections.validFrom : valueCollections.validFromStartDay
   );
  
  const mappedValidFrom = () =&gt; (
        &lt;div&gt;
          {valueCollections.validFrom !== null
            ? (&lt;div&gt;
              {getFieldDecorator('ValidFrom', {
                initialValue: startOfDayPick,
              })(dataPickerWithChangesFormatStart)}
            &lt;/div&gt;)
            : (&lt;p&gt;{valueIsEmpty}&lt;/p&gt;)
          }
        &lt;/div&gt;
      );
  
  const handlerAllDayChecked = () =&gt; {
        this.setState({
          showAndHideShowTime: !this.state.showAndHideShowTime,
        });
      };
  
  
     }
  return (
  &lt;div&gt;
       {mappedValidFrom()}
  &lt;/div&gt;
  )
  }
  </code></pre>
  
  <p>I must to do when I click checkbox AllDay then time is change to 00:00 but when I choose some data after then click checkbox isn't working...
  Somebody maybe have to resolve? Help :-)</p>
  
  <p><a href="https://i.stack.imgur.com/YyvAO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YyvAO.png" alt="enter image description here"></a></p>