text: import React, {Component} from 'react';
  import {Text, View} from 'react-native';
  import Calendar from '../calendar';
  import styleConstructor from './style';
  
  class CalendarListItem extends Component {
    constructor(props) {
      super(props);
      this.style = styleConstructor(props.theme);
    }
  
    shouldComponentUpdate(nextProps) {
      const r1 = this.props.item;
      const r2 = nextProps.item;
      return r1.toString('yyyy MM') !== r2.toString('yyyy MM') || !!(r2.propbump && r2.propbump !== r1.propbump);
    }
  
    render() {
      const row = this.props.item;
      if (row.getTime) {
        return (
          <Calendar
            theme={this.props.theme}
            style={[{height: this.props.calendarHeight}, this.style.calendar]}
            current={row}
            hideArrows
            hideExtraDays={this.props.hideExtraDays === undefined ? true : this.props.hideExtraDays}
            disableMonthChange
            markedDates={this.props.markedDates}
            markingType={this.props.markingType}
            hideDayNames={this.props.hideDayNames}
            onDayPress={this.props.onDayPress}
            displayLoadingIndicator={this.props.displayLoadingIndicator}
            minDate={this.props.minDate}
            maxDate={this.props.maxDate}
            firstDay={this.props.firstDay}
            monthFormat={this.props.monthFormat}
            disabledByDefault={this.props.disabledByDefault}
          />);
      } else {
        const text = row.toString();
        return (
          <View style={[{height: this.props.calendarHeight}, this.style.placeholder]}>
            <Text style={this.style.placeholderText}>{text}</Text>
          </View>
        );
      }
    }
  }
  
  export default CalendarListItem;