title: DatePicker onchange event not giving the updated value
body: <p>I have a datepicker and it shows a default value(shows only if the api has a value), when I update it, <strong>onchange function doesn't give the selected value</strong>. it gives the initial value which is coming from the api. any idea how I can get the updated value to onchange function.</p>
  <p>api data</p>
  <pre><code>const apidata = my api
  
  setState({
  ...state,
  formData:{
  ...apidata,
  startDate:moment(apidata.startDate).utc()
  }
  })
  </code></pre>
  <p>form component</p>
  <pre><code>&lt;Form
     name=&quot;update form&quot;
     initialValues={state.formData}
     autoComplete=&quot;off&quot;
     form={form}
  &gt;
   &lt;Form.Item
      label=&quot;Start Date&quot;
      name=&quot;startDate&quot;
      rules={[{ required: true, message: &quot;Please enter value!!!!!&quot; }]}
  &gt;
              &lt;DatePicker 
              value={state.formData?.startDate}
              onChange={(date: any)=&gt;updateFields(date)}
               /&gt;
  &lt;/Form.Item&gt;
  &lt;/Form&gt;
  </code></pre>
  <p>update function</p>
  <pre><code>const updateFields = (data:any) =&gt; { // here I'm getting the already set api value not the changed value
  setState({
  ...state,
  formData : {
  startDate:data
  }
  })
  }
  </code></pre>