title: How can I get a selected value from DateTimePicker using 'react-datetime'
body: <p>I want to get a selected value from my DateTimePicker. instead of seeing the value I see [Object object]</p>
  
  <p>This is my DateTimePicker.</p>
  
  <pre><code>  import React from 'react';
  
      import momentLocaliser from 'react-widgets-moment';
  
      import DateTime from 'react-datetime';
  
     import PropTypes from 'prop-types';
      import classNames from 'classnames';
  
    const moment = require('moment');
  
    moment.locale('es');
  
    momentLocaliser(moment);
  
  
     const handleChange = (e) =&gt;{
  
        const valueOfInput = moment(e.target.value).format('DD-MM-YYYY HH:mm');
  
      return valueOfInput;
  
      }
  
      const DateTimePickerInput = ({
             label,
             format,
             input,
             width,
             placeholder,
             selected,
             tooltip,
             tooltipPlacement,
             disabled,
            defaultValue,
            inputProps,
             meta: { valid, touched, error},
            //input: { onChange, value, onBlur},
            showTime,
            ...props
             }) =&gt; {
  
            const classes = classNames('form-group', {
             'has-error': (touched &amp;&amp; !valid),
              'has-success': (touched &amp;&amp; !valid)
           })
         return (
            &lt;div className={classes}&gt;
               &lt;label htmlFor={input.name}&gt;{label}&lt;/label&gt; &lt;br /&gt;
               &lt;DateTime
  
              name = {input.name}
              locale='es'
              dateFormat= "DD-MM-YYYY"
              timeFormat= "HH:mm"
  
            onChange = {(changedVal) =&gt; handleChange(changedVal)}
  
            inputProps={{disabled: true, placeholder: {handleChange}}} //In placeholder is the issue
  
           /&gt;
  
          {(!valid &amp;&amp; touched) &amp;&amp;
               &lt;p className='help-block'&gt;{error}&lt;/p&gt;
             }
            &lt;/div&gt;
           );
        };
  
       DateTimePickerInput.propTypes = {
           disabled: PropTypes.bool,
           input: PropTypes.object.isRequired,
           label: PropTypes.string.isRequired,
           meta: PropTypes.object.isRequired,
           placeholder: PropTypes.string,
           tooltip: PropTypes.string,
           tooltipPlacement: PropTypes.string
        }
  
  
  
  
      export default DateTimePickerInput;
  </code></pre>
  
  <p>I expect getting the selected value from dateTimePicker but only instead see that I see [Object object].</p>
  
  <p>I need solve now.</p>
  
  <p>I believe if I declare onChange like parameter when I'm declaring DateTimePickerInput and assign to placeholder onChange, things would change. But I'm not sure. I need anyone tells me what is wrong.</p>