<commit_before>import React from 'react';
import DatePicker from '../../src';
import moment from 'moment';

class DatePickerValue extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      value: moment()
    };
  }
  render() {
    return (
      <div className="field">
        <DatePicker defaultValue={moment()} onChange={(value) => {
          console.log('1', value.format('YYYY-MM-DD'));
        }} />
        <DatePicker
          value={this.state.value}
          onChange={(value) => {
            console.log('2', value.format('YYYY-MM-DD'));
            this.setState({ value });
          }}
        />
      </div>
    );
  }
}

export default DatePickerValue;
<commit_msg>Update docs<commit_after>import React from 'react';
import DatePicker from '../../src';
import moment from 'moment';

class DatePickerValue extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      value: moment()
    };
  }
  render() {
    return (
      <div className="field">
        <DatePicker
          defaultValue={moment()}
          onChange={(value) => {
            console.log('1', value && value.format('YYYY-MM-DD'));
          }}
        />
        <DatePicker
          value={this.state.value}
          onChange={(value) => {
            console.log('2', value && value.format('YYYY-MM-DD'));
            this.setState({ value });
          }}
        />
      </div>
    );
  }
}

export default DatePickerValue;

{'fraction_non_alphanumeric': 0.16375838926174496, 'fraction_numerical': 0.0026845637583892616, 'mean_word_length': 2.0304878048780486, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7367659', 'n_tokens_mistral': 429, 'n_tokens_neox': 437, 'n_words': 85}