<commit_before>'use strict'

import React from 'react'
import $ from 'jquery'
import _ from 'underscore'

import DatePicker from 'react-datepicker';
import moment from 'moment';

export default React.createClass({

    getInitialState: function() {
      // moment comes from momentJS library
        return {startDate: null};
    },


    handleChange: function(date) {
        this.setState({startDate: date});
        // months and days are an array that start at index 0;
        var formattedDate = date.year() + '-' + (date.month() + 1) + '-' + (date.date());
        this.props.assignActivityDueDate(this.props.activity, formattedDate);
    },

    tooltipTrigger: function(e) {
        e.stopPropagation();
        this.refs.activateTooltip.getDOMNode().tooltip('show');

    },
    tooltipTriggerStop: function(e) {
        e.stopPropagation();
        this.refs.activateTooltip.getDOMNode().tooltip('hide');
    },


    removeActivity: function() {
        this.props.toggleActivitySelection(this.props.activity, false);
        this.initializeDatePicker();
    },

      render: function() {
        return (
          <tr>
            <td>
              <div ref='activateTooltip' className={'activate-tooltip ' + this.props.activity.classification.image_class} data-html='true' data-toggle='tooltip' data-placement='top' title={'<h1>' + this.props.activity.name + '</h1><p>App: ' + this.props.activity.classification.alias + '</p><p>' + this.props.activity.topic.name +  '</p><p>' + this.props.activity.description + '</p>'}></div>
            </td>
            <td onMouseEnter={this.tooltipTrigger} onMouseLeave={this.tooltipTriggerStop} className='tooltip-trigger activity_name'>{this.props.activity.name}</td>
            <td>
              <DatePicker selected={this.state.startDate}  minDate={moment()} onChange={this.handleChange}   placeholderText='Optional'/><commit_msg>Increments zero-indexed day by 1<commit_after>'use strict'

import React from 'react'
import $ from 'jquery'
import _ from 'underscore'

import DatePicker from 'react-datepicker';
import moment from 'moment';

export default React.createClass({

    getInitialState: function() {
      // moment comes from momentJS library
        return {startDate: null};
    },


    handleChange: function(date) {
        this.setState({startDate: date});
        // months and days are an array that start at index 0;
        var formattedDate = date.year() + '-' + (date.month() + 1) + '-' + (date.date() + 1);
        this.props.assignActivityDueDate(this.props.activity, formattedDate);
    },

    tooltipTrigger: function(e) {
        e.stopPropagation();
        this.refs.activateTooltip.getDOMNode().tooltip('show');

    },
    tooltipTriggerStop: function(e) {
        e.stopPropagation();
        this.refs.activateTooltip.getDOMNode().tooltip('hide');
    },


    removeActivity: function() {
        this.props.toggleActivitySelection(this.props.activity, false);
        this.initializeDatePicker();
    },

      render: function() {
        return (
          <tr>
            <td>
              <div ref='activateTooltip' className={'activate-tooltip ' + this.props.activity.classification.image_class} data-html='true' data-toggle='tooltip' data-placement='top' title={'<h1>' + this.props.activity.name + '</h1><p>App: ' + this.props.activity.classification.alias + '</p><p>' + this.props.activity.topic.name +  '</p><p>' + this.props.activity.description + '</p>'}></div>
            </td>
            <td onMouseEnter={this.tooltipTrigger} onMouseLeave={this.tooltipTriggerStop} className='tooltip-trigger activity_name'>{this.props.activity.name}</td>
            <td>
              <DatePicker selected={this.state.startDate}  minDate={moment()} onChange={this.handleChange}   placeholderText='Optional'/>
{'fraction_non_alphanumeric': 0.15114143269483074, 'fraction_numerical': 0.0026239832065074785, 'mean_word_length': 3.1525054466230937, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, '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': '2898257', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1076, 'n_words': 208}