title: How to save and load the saved Antd DatePicker object value in React?
body: <p>I am creating a react app using Antd library. I have form item:</p>
  
  <pre><code>&lt;FormItem {...formItemLayout} label="Validity Period"&gt;
        {getFieldDecorator('validityPeriod', {
            // initialValue: this.state.recordToBeEdited.validityPeriod,
            rules: [{ type: 'array', required: false }],
         })(
                &lt;RangePicker
                  showTime={{ format: 'HH:mm' }}
                  format="YYYY-MM-DD HH:mm"
                  placeholder={['Start Time', 'End Time']}
                  onChange={console.log("Ok Changed")}
                  style={{ width: '100%' }}
                  onOk={console.log("Ok Clicked")}
                /&gt;
          )}
  &lt;/FormItem&gt;
  </code></pre>
  
  <p>In the HandleSubmit(e) function I am getting two moment Objects. But when I POST the data they get converted into strings with the following format:</p>
  
  <pre><code>"validityPeriod":["2018-01-11T12:32:26.551Z","2018-02-19T12:32:26.551Z"]
  </code></pre>
  
  <p>The Problem is when I am trying to set the initial value of the range picker using the json which I receive in other components I get the error default value is not in the required format.</p>
  
  <p>What can I do to make the incoming array of time strings to the format which antd rangepicker accepts?</p>