getDate(value) {
    let defaults = [], day, month, year;
    // Map positions to identifiers to get default values for each part of day
    const [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
    const defaultValue = value || this.component.defaultValue;
    if (defaultValue) {
      defaults = defaultValue.split('/').map(x => parseInt(x, 10));
    }

    const isModalEditClosed = this.component.modalEdit && !this.componentModal.isOpened;
    if (this.showDay && this.refs.day) {
      day = (this.refs.day.value === '' && !isModalEditClosed) ? '' : parseInt(this.refs.day.value, 10);
    }
    if (day === undefined || _.isNaN(day) || value) {
      day = (defaults.length !== 3)
        ? this.getDayWithHiddenFields(defaults).day
        : (defaults[DAY] && !_.isNaN(defaults[DAY]) ? defaults[DAY] : 0);
    }

    if (this.showMonth && this.refs.month) {
      // Months are 0 indexed.
      month = (this.refs.month.value === '' && !isModalEditClosed) ? '' : parseInt(this.refs.month.value, 10);
    }
    if (month === undefined || _.isNaN(month) || value) {
      month = (defaults.length !== 3)
        ? this.getDayWithHiddenFields(defaults).month
        : (defaults[MONTH] && !_.isNaN(defaults[MONTH]) ? defaults[MONTH] : 0);
    }

    if (this.showYear && this.refs.year) {
      year = (this.refs.year.value === '' && !isModalEditClosed) ? '' : parseInt(this.refs.year.value);
    }
    if (year === undefined || _.isNaN(year) || value) {
      year = (defaults.length !== 3)
        ? this.getDayWithHiddenFields(defaults).year
        : (defaults[YEAR] && !_.isNaN(defaults[YEAR]) ? defaults[YEAR] : 0);
    }

    let result;
    if (!day && !month && !year) {
      if (!isModalEditClosed) {
        this.dataValue = this.emptyValue;
        if (this.options.building) {
          this.triggerChange();
        }
      }
      return null;
    }

    // add trailing zeros if the data is showed
    day = this.showDay ? day.toString().padStart(2, 0) : '';
    month = this.showMonth ? month.toString().padStart(2, 0) : '';
    year = this.showYear ? year.toString().padStart(4, 0) : '';

    if (this.component.dayFirst) {
      result = `${day}${this.showDay && this.showMonth || this.showDay && this.showYear ? '/' : ''}${month}${this.showMonth && this.showYear ? '/' : ''}${year}`;
    }
    else {
      result = `${month}${this.showDay && this.showMonth || this.showMonth && this.showYear ? '/' : ''}${day}${this.showDay && this.showYear ? '/' : ''}${year}`;
    }

    return result;
  }
Return the date for this component.
@param {any} value - The value to convert to a date.
@returns {null|string} - The date string.