<commit_before>import React, { Component } from 'react';
import { DatePicker } from 'antd';
import moment from 'moment';

export default class DatePickerInt extends Component {
  onChange = (e) => {
    const { onChange } = this.props;
    const value = !e ? null : +e;
    onChange(value);
  };
  getValue = () => {
    let { value } = this.props;
    // 2014-09-14T10:32:27.831Z
    if (typeof value === 'string') { value = +moment(value.replace(/"/g, '')); }
    return value ? moment(value) : undefined;
  };
  render() {
    return (
      <DatePicker
        {...this.props}
        value={this.getValue()}
        onChange={this.onChange}
      />
    );
  }
}<commit_msg>date-edit wudth = 100%<commit_after>import React, { Component } from 'react';
import { createComponent } from 'olymp-fela';
import { DatePicker } from 'antd';
import moment from 'moment';

const StyledDatePicker = createComponent(
  () => ({
    width: '100%',
  }),
  p => <DatePicker {...p} />,
  p => Object.keys(p),
);

export default class DatePickerInt extends Component {
  onChange = e => {
    const { onChange } = this.props;
    const value = !e ? null : +e;
    onChange(value);
  };

  getValue = () => {
    let { value } = this.props;
    // 2014-09-14T10:32:27.831Z
    if (typeof value === 'string') {
      value = +moment(value.replace(/"/g, ''));
    }
    return value ? moment(value) : undefined;
  };

  render() {
    return (
      <StyledDatePicker
        {...this.props}
        value={this.getValue()}
        onChange={this.onChange}
      />
    );
  }
}
{'fraction_non_alphanumeric': 0.17391304347826086, 'fraction_numerical': 0.02557544757033248, 'mean_word_length': 2.5649202733485192, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 13, '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': '6582149', 'n_tokens_mistral': 545, 'n_tokens_neox': 521, 'n_words': 118}