title: How to pass value of selection from calendar to input
body: <p>I'm using a DatePicker component, from the Antd library that's running MomentJS under the hood for date/time functionality, as part of a larger scheduling component.</p>
  
  <p>I've created a second input element within my component that is set to disabled. This is so that the input is read only. I'm trying to pass the value of whatever date is selected from the calendar to that input field in this format: <code>7/09/2019</code></p>
  
  <p>Is there a way to do this at the component level?</p>
  
  <p><a href="https://codesandbox.io/s/goofy-currying-csgtr?fontsize=14" rel="nofollow noreferrer"><img src="https://codesandbox.io/static/img/play-codesandbox.svg" alt="Edit goofy-currying-csgtr"></a></p>
  
  <p><code>My Component</code></p>
  
  <pre><code>import React from "react";
  import ReactDOM from "react-dom";
  import "antd/dist/antd.css";
  import "./index.css";
  import { DatePicker, Row, Col } from "antd";
  
  function onChange(value, dateString) {
    console.log("Selected Time: ", value);
    console.log("Formatted Selected Time: ", dateString);
  }
  
  function onOk(value) {
    console.log("onOk: ", value);
  }
  
  ReactDOM.render(
    &lt;div&gt;
      &lt;Row&gt;
        &lt;Col span={8}&gt;
          &lt;DatePicker
            open
            className="my-class"
            onChange={onChange}
            onOk={onOk}
            format="MMMM"
          /&gt;
        &lt;/Col&gt;
        &lt;Col span={2} offset={6}&gt;
          &lt;input value="7/09/2019" disabled /&gt;
        &lt;/Col&gt;
      &lt;/Row&gt;
    &lt;/div&gt;,
    document.getElementById("container")
  );
  
  </code></pre>